Code sample
This topic provides a code sample for integrating Audio & Video Calling with Android and explains how to use it.
Download the code sample
Click here to download the Audio & Video Calling code sample.
Use the code sample
Replace the configuration file in the sample project.
Download the
.configconfiguration file for your mPaaS application. Place it in theapp/folder of the Audio & Video Calling sample project to replace the existing configuration file.
Create a call application and obtain the bizName. In the mPaaS console, navigate to Audio & Video Calling > Call Application Management from the navigation pane on the left. You can create a new call application or open an existing one to obtain its bizName.
Generate a temporary signature in the console. In the mPaaS console, navigate to Audio & Video Calling > Signature Verification from the navigation pane on the left. In the Generate Temporary Signature area, select your call application and enter a UserID to generate a temporary signature.
NoteYou must generate a new temporary signature if you change the call application or UserID.
Temporary signatures expire. You must generate a new signature after the previous one expires.
Configure and run the sample project. On the App Settings page, enter the user ID (userId), business name (bizName), and temporary signature (signature) that you obtained in the previous steps.
NoteTo ensure the security of your traffic, you must generate signatures on the server-side after your application is published.
Start or join an audio/video call. In the app, you can create a call channel to start an audio/video call. Alternatively, you can join an existing call by entering the channel ID (roomId) and token.
NoteWithin the same call application (which uses the same bizName), the user IDs for different clients must be unique.