This document introduces how to quickly run through Live Streaming sample project.
Demo effect:
- Android Studio 4.0 or higher
- Android SDK API Level 24 or higher
- A mobile device that runs Android 7.0 or higher
- FaceUnity beauty authpack file
- Follow The Account Document to get the App ID and App Certificate.
- Follow The Restfull Document to get the Customer ID and Customer Secret.
- Follow Signaling Beginner's Guide to enable signaling in Agora Console. You should enable the following:
- Using storage
- User attribute callback
- Channel attribute callback
- Distributed lock
- Please contact technical support to enable robot room streaming service.
If this step is not executed, you will not be able to see the video in robot rooms.
- Open the
Android
project and fill in properties got above to the root gradle.properties file.
# RTM RTC SDK key Config
AGORA_APP_ID=<Your Agora App ID>
AGORA_APP_CERTIFICATE=<Your Agora App Certificate>
# Cloud Player Config
CLOUD_PLAYER_KEY=<Your Agora Customer ID>
CLOUD_PLAYER_SECRET=<Your Agora Customer Secret>
- Obtain beauty resources and certificate files from FaceUnity:
-
Configure the package name applicationId corresponding to the certificate in app/build.gradle.
-
Put the FaceUnity beauty resources into the corresponding path.
FaceUnity Beauty Resources Location makeup resource (e.g. naicha.bundle) scenes/show/src/main/assets/beauty_faceunity/makeup sticker resource (e.g. fashi.bundle) scenes/show/src/main/assets/beauty_faceunity/sticker animoji resource (e.g. kaola.bundle) scenes/show/src/main/assets/beauty_faceunity/animoji authpack.java scenes/show/src/main/java/io/agora/scene/show/beauty/authpack.java
If this step is not executed, you will not be able to experience the beauty feature.
- Now you can run the project with android studio to experience the application.
Path(Android/scenes/show/src/main/java/io/agora) | Description |
---|---|
beautyapi/faceunity/ | Agora FaceUntiy Beauty Scenes API. |
scene/show/vodeoSwitcherAPI/ | Agora Video Switcher Scenes API. |
scene/show/service/ | Living streaming service protocol and implement. |
scene/show/RoomListActivity.kt | Living room list view. |
scene/show/LivePrepareActivity.kt | Living prepare view. |
scene/show/LiveDetailActivity.kt | Living room detail scroll page view. |
scene/show/LiveDetailFragment.kt | Living room detail view. |
scene/show/RtcEngineInstance.kt | RTC Engine initializing. |
scene/show/VideoSetting.kt | RTC video setting. |
scene/show/ShowLogger.kt | Living streaming logger. |
scene/show/debugSettings/ | Living streaming debug setting ui. |
scene/show/beauty/ | Living streaming beauty implement. |
scene/show/utils/ | Living streaming utils. |
scene/show/widget/ | Living streaming UI widgets. |
If you have any problems or suggestions regarding the sample projects, feel free to file an issue.
- Check our FAQ to see if your issue has been recorded.
- Dive into Agora SDK Samples to see more tutorials.
- Take a look at Agora Use Case for more complicated real use cases.
- Repositories managed by developer communities can be found at Agora Community.
- If you encounter problems during integration, feel free to ask questions on Stack Overflow.
The sample projects are under the MIT license.