This repository contains a demo app, which shows how to use the Amazon IVS mobile broadcasting SDK to create a mobile streaming app on Android using Kotlin.
- Clone the repository to your local machine.
- Open the repository in Android Studio, or an IDE of your choice.
- (Optional)* Refer to the Streaming to Amazon IVS section of this readme to set up the app for streaming.
- Run the application on an emulated device or a physical device running API level 29 or later.
*You can run and build this app without an Amazon IVS Channel, but you will need an Amazon IVS Channel in order to start broadcasting.
IMPORTANT NOTE: Using your own stream will create and consume AWS resources, which will cost money.
- Create and set up an Amazon IVS channel. A guide is available here: Getting started with Amazon IVS.
- Open the Amazon IVS Console and navigate to the channel you would like to use.
- Open the App's
build.gradle
file and find lines 18-20. - Copy the Ingest Server for the channel and paste it into the
SERVER_URL
field on line 18 between the two escaped quotes. The resulting line should look like the following:buildConfigField "String", "SERVER_URL", "\"rtmps://<ingest_server_url>:443/app/\""
- Copy the Stream Key for the channel and paste it into the
STREAM_KEY
field on line 19 between the two escaped quotes. - Copy the Playback URL for the channel and paste it into the
PLAYBACK_URL
field on line 20 between the two escaped quotes. - Android Studio will ask to sync the project since the gradle file has been changed. Select
Sync now
to sync. - Save and build the application.
You can also change the values for any of these fields in the app settings once you have launched the app in the Android Emulator, or a physical Android device.
- The app is currently locked to portrait orientation because of a potential issue on some devices. A fix is being investigated.
- Screen sharing more than once during a broadcast session can lead to app instability and unexpected behavior. A fix for this issue is being investigated.
- This app has only been tested on devices running API level 29 or later. While this app may work on devices running older versions of Android, it has not been tested on them.
This project is licensed under the MIT-0 License. See the LICENSE file.