Making a Voice call

Making a Voice call

Scenario 1: Make a Voice Call

  1. Integrate the package. Agora provides two packages for Android to enable the voice call function: The voice package and the full package. It is recommended to integrate the full package due to the following reasons:
    • If you only need the voice function, you can just disable the video function.
    • You only need the voice function but can add the video function later.

Integrate either one of the following packages according to your actual needs:

Voice Package Integrate Voice Package
Full Package(Video Package) Integrate Video Package
  1. Create an RtcEngine Object, see Create RtcEngine Object (create).
  2. Create and join a channel, see Join Channel (joinChannel)

Sample Code:

//Create a RtcEngine Object
RtcEngine rtcEngine = RtcEngine.create(ctx, "74******************************a", myRtcEventHandler);

//create and join a channel
rtcEngine.joinChannel(null, "channelName", null, myUid)

You can now start a one-to-one or group voice call. The difference between a one-to-one and group call is the number of people joining the channel.

Scenario 2: Implement other Functions

Agora will provide the API call workflow and sample code for the following scenarios in the future. For now, see Voice Call API:

  • Text messages
  • Control voice; for example, mute or unmute

You may need the following functions for a voice call:

  • ../Tutorial/recording
  • ../Tutorial/encryption_android_agora
  • ../Tutorial/encryption_android_customize
  • ../Tutorial/rawdata_android