Android Sonnet audio and video experience record

Support voice and video call live functions, functions or more powerful, then...Copy the code

Start the integration experience!

Start by signing up for a Sonic developer account.Copy the code

Note: It is best not to use a cooperative account, there may be some minor problems

After registration, the following interface is displayedCopy the code

Create a projectCopy the code

After the project is created, you can see some relevant informationCopy the code

Begin to integrate

Take a look at the requirements make sure the following development environment requirements are met: Android SDK API Level Level ≥ 16 Android Studio 3.0 or later App requires Android 4.1 or later devices to open specific ports before using Agora functions and services. For details, see firewall instructions.  If your app is targeting Android 9, keep an eye out for Android privacy changes.Copy the code
Files to download:
Android Voice Call/Live voice SDKCopy the code

Build. Gradle

implementation fileTree(dir: '.. /.. /.. /libs', include: ['*.jar']) android { ... sourceSets { main { jniLibs.srcDirs = ['../../../libs'] } } }Copy the code

Configuring a Path

Set the liBS storage path. Using Android open Studio projects you want to run (based on the sample files, for example), choose the app/SRC/main/build. Gradle file, add default libs path to the fileTree in the line of code. Add the LIBS file package. Add the liBS file package according to the preset path in Step 1. Add sourceSets. In the build.gradle file, set the path where the sourceSets is stored. The path must be the same as the libs path.Copy the code

Structure is as follows

Then in/SRC/main/res/values/strings. The XML this file write we apply for the key

<string name="agora_app_id"> Application ID </string>Copy the code

This is the ID we applied for

This is the ID

Then configure the SDK to download and configure if it is not downloaded

Voice and video of course require permissions network request - read and write memory card - open camera - read and write voice etc. These permissions are only available in Android6.0 and need to be applied dynamicallyCopy the code

Required permissions:

Add confusion -keep class IO. Agora.**{*; }Copy the code

Start by referring to the documentation using the Soundnet SDK:

Effect:

It’s quite powerful.

conclusion

More powerful 2. More detailed API documentation 3. Free (free for 10,000 minutes per month) 4. The official quick integration document is not too detailed. 5. The function and performance are relatively good and worthy of recommendationCopy the code

Agora SDK experience essay contest essay | the nuggets technology, the campaign is underway