Making a Voice Call¶
This page demonstrates the following functions with the Agora sample code Agora-Android-Voice-Tutorial-1to1:
- Create and join a channel
- Make a one-to-one voice call
- Mute the call
- Enable the speakerphone
Step 1: Download the Sample Code¶
Download the latest Voice SDK.
|./samples||Agora-Android-Voice-Tutorial-1to1 Sample Code|
Step 2: Prepare the Environments¶
Prepare the following environments:
- Android SDK API Level 16 or later
- Android Studio 2.0 or later
- Android 4.1 and later devices with audio and video functionalities
- Get an App ID
Step 3: Make a Voice Call¶
To make a voice call with the Agora-Android-Voice-Tutorial-1to1 sample code in the Android Voice package:
Compile the Sample Code¶
- Select Import project (Eclipse ADT, Gradle, etc.) in Android Studio.
- Import build.gradle using the import function of Android Studio.
- Enter your App ID in Agora-Android-Voice-Tutorial-1to1/app/res/values/src/strings.xml.
- Click the Run button to compile the sample code with an Android device connected.
Run the Sample Code¶
You need two phones to run the sample code for a voice call. Open the compiled app on each Android device. The following screen displays:
You can press the buttons on the screen to mute/unmute yourself or enable the speaker.