GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — API-Examples/Android/APIExample at main · AgoraIO/API-Examples

Expand file tree

/

APIExample

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

APIExample

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.agents/skills
.agents/skills
 
 
agora-simple-filter
agora-simple-filter
 
 
agora-stream-encrypt
agora-stream-encrypt
 
 
app
app
 
 
gradle/wrapper
gradle/wrapper
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
ARCHITECTURE.md
ARCHITECTURE.md
 
 
CLAUDE.md
CLAUDE.md
 
 
README.md
README.md
 
 
README.zh.md
README.zh.md
 
 
build.gradle
build.gradle
 
 
checkstyle.gradle
checkstyle.gradle
 
 
checkstyle.xml
checkstyle.xml
 
 
cloud_build.sh
cloud_build.sh
 
 
detekt-baseline.xml
detekt-baseline.xml
 
 
detekt-config.yml
detekt-config.yml
 
 
detekt.gradle
detekt.gradle
 
 
git-hooks.gradle
git-hooks.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
keystore.key
keystore.key
 
 
settings.gradle
settings.gradle
 
 

README.md

Outline

API Example Android

English | 中文

This project presents you a set of API examples to help you understand how to use Agora APIs.

Prerequisites

  • Android Studio Ladybug (2024.2.1) or later
  • JDK 17
  • Android SDK Platform 35
  • Physical Android device
  • Android simulator is supported

Quick Start

This section shows you how to prepare, build, and run the sample application.

Obtain an App Id

To build and run the sample application, get an App Id:

  1. Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.

  2. Navigate in the Dashboard tree on the left to Projects > Project List.

  3. Save the App Id from the Dashboard for later use.

  4. Save the App Certificate from the Dashboard for later use.

  5. Open Android/APIExample and edit the local.properties file in the project root. Update YOUR APP ID with your App Id. If your Agora project has App Certificate enabled and you want to use the sample's built-in token generation flow, update YOUR APP CERTIFICATE as well.

    sdk.dir=/path/to/Android/sdk
    AGORA_APP_ID=YOUR APP ID
    AGORA_APP_CERT=YOUR APP CERTIFICATE
    

AGORA_APP_ID is required. If your project does not enable App Certificate, leave AGORA_APP_CERT blank. If you generate tokens on your own server, keep AGORA_APP_CERT empty on the client side and use the ByToken examples to paste the token at runtime.

You are all set. Now connect your Android device and run the project.

Beauty Configuration

Third Part Beauty case use the Agora Beauty API Library

This project contains third-party beauty integration examples, which cannot be enabled by default without configuring resources and certificates. The resource certificate configuration method is as follows:

During Gradle configuration, the project automatically downloads and caches the SenseTime 9.3.1 Android libraries declared in app/vendors.gradle. The first Gradle sync therefore requires network access. This download does not include the SenseTime assets or license listed below; provide those files separately.

Agora Beauty 2.0

The Agora Beauty 2.0 material package is not included in this repository. Before building locally:

  1. Obtain AgoraBeautyMaterial.zip from Agora technical support.
  2. Extract AgoraBeautyMaterial.zip to app/src/main/assets/beauty_agora/.

The extracted resources should have the following structure:

app/src/main/assets/beauty_agora/
└── beauty_material_functional/
    ├── config.json
    └── ...

The material directory is ignored by Git.

SenseTime

  1. Contact SenseTime customer service to obtain the download link and certificate of the beauty sdk
  2. Unzip the beauty sdk, and copy the following resources to the corresponding path
SenseTime Beauty SDK Path Location
Android/models app/src/main/assets/beauty_sensetime/models
Android/sample/SenseMeEffects/app/src/main/assets/sticker_face_shape app/src/main/assets/beauty_sensetime/sticker_face_shape
Android/sample/SenseMeEffects/app/src/main/assets/style_lightly app/src/main/assets/beauty_sensetime/style_lightly
Android/sample/SenseMeEffects/app/src/main/assets/makeup_lip app/src/main/assets/beauty_sensetime/makeup_lip
SenseME.lic app/src/main/assets/beauty_sensetime/license/SenseME.lic

FaceUnity

  1. Contact FaceUnity customer service to obtain beauty resources and certificates
  2. Put the beauty resource and certificate in the corresponding path
FaceUnity Beauty Resources Location
makeup resource(e.g. naicha.bundle) app/src/main/assets/beauty_faceunity/makeup
sticker resource(e.g. fashi.bundle) app/src/main/assets/beauty_faceunity/sticker
authpack.java app/src/main/java/io/agora/api/example/examples/advanced/beauty/authpack.java

For Agora Extension Developers

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:

  1. Download opencv library, unzip it and copy into Android/APIExample/agora-simple-filter/src/main/jniLibs
Android/APIExample/agora-simple-filter/src/main/jniLibs
├── arm64-v8a
└── armeabi-v7a
  1. Download Agora SDK RESOURCE, unzip it and copy c++ .so library (keeps arch folder) to Android/APIExample/agora-simple-filter/src/main/agoraLibs; Replace the low_level_api/include .h files in the Android/APIExample/agora-simple-filter/src/main/cpp/AgoraRtcKit directory.
Android/APIExample/agora-simple-filter/src/main/agoraLibs
├── arm64-v8a
├── armeabi-v7a
├── x86
└── x86_64
Android/APIExample/agora-simple-filter/src/main/cpp
└── AgoraRtcKit
  1. Modify simpleFilter to true in Android/APIExample/gradle.properties

Stream Encrypt

This project contains custom stream encrypt examples, which cannot be enabled by default. The configuration method is as follows:

  1. Download Agora SDK RESOURCE, unzip it and copy c++ .so library (keeps arch folder) to Android/APIExample/agora-stream-encrypt/src/main/agoraLibs; Replace the high_level_api/include .h files in the Android/APIExample/agora-stream-encrypt/src/main/cpp/include/agora directory.
Android/APIExample/agora-stream-encrypt/src/main/agoraLibs
├── arm64-v8a
├── armeabi-v7a
├── x86
└── x86_64
Android/APIExample/agora-stream-encrypt/src/main/cpp
└── include
    └── agora
  1. Modify streamEncrypt to true in Android/APIExample/gradle.properties

Contact Us

  • 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

License

The MIT License (MIT)

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.