English | 中文
This project presents you a set of API examples to help you understand how to use Agora APIs.
- Android Studio 3.0+
- Physical Android device
- Android simulator is supported
This section shows you how to prepare, build, and run the sample application.
To build and run the sample application, get an App Id:
-
Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.
-
Navigate in the Dashboard tree on the left to Projects > Project List.
-
Save the App Id from the Dashboard for later use.
-
Save the App Certificate from the Dashboard for later use.
-
Generate a temp Access Token (valid for 24 hours) from dashboard page with given channel name, save for later use.
-
Open
Android/APIExampleand edit theapp/src/main/res/values/string-config.xmlfile. UpdateYOUR APP IDwith your App Id, updateYOUR APP CERTIFICATEwith the main app certificate from dashboard, and updateYOUR ACCESS TOKENwith the temp Access Token generated from dashboard. Note you can leave the token and certificate variablenullif your project has not turned on security token.// Agora APP ID. <string name="agora_app_id" translatable="false">YOUR APP ID</string> // Agora APP Certificate. If the project does not have certificates enabled, leave this field blank. <string name="agora_app_certificate" translatable="false">YOUR APP CERTIFICATE</string> // Temporary Access Token. If agora_app_certificate is configured, this field will be invalid. <string name="agora_access_token" translatable="false">YOUR ACCESS TOKEN</string>
You are all set. Now connect your Android device and run the project.
从4.0.0SDK开始,Agora SDK支持插件系统和开放的云市场帮助开发者发布自己的音视频插件,本项目包含了一个SimpleFilter示例,默认是禁用的状态,如果需要开启编译和使用需要完成以下步骤: Since version 4.0.0, Agora SDK provides an Extension Interface Framework. Developers could publish their own video/audio extension to Agora Extension Market. In this project includes a sample SimpleFilter example, by default it is disabled. In order to enable it, you could do as follows:
- Download opencv library, unzip it and copy into Android/APIExample/agora-simple-filter/src/main/jniLibs
- Download Agora SDK包, unzip it and copy c++ .so library (keeps arch folder) to Android/APIExample/agora-simple-filter/src/main/agoraLibs
- Modify simpleFilter to true in Android/APIExample/gradle.properties
- For potential issues, take a look at our FAQ first
- Dive into Agora SDK Samples to see more tutorials
- Take a look at Agora Use Case for more complicated real use case
- Repositories managed by developer communities can be found at Agora Community
- You can find full API documentation at Document Center
- If you encounter problems during integration, you can ask question in Stack Overflow
- You can file bugs about this sample at issue
The MIT License (MIT)