Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Latest commit

 

History

History

audiocall

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Voximplant Audio Call Demo (Android)

This demo demonstrates basic audio call functionality of the Voximplant Android SDK. The application supports audio calls between this Android app and other apps that use any Voximplant SDK. Based on MVP architectural pattern.

Features

The application is able to:

  • log in to the Voximplant Cloud
  • make an audio call
  • receive an incoming call
  • put a call on hold / take it off hold
  • change an audio device (speaker, receiver, wired headset, bluetooth headset) during a call
  • mute audio during a call
  • send DTMF
  • receive push notifications (requires additional setup)
  • turn off the touch screen during calls when your ear is close to the screen (proximity sensor usage)

Android 9

Because of the limited access to sensors in background in Android 9, we have made a foreground service to access microphone while app is in the background.

See the following file for code details:

  • CallService (also used to work with proximity sensor)

Android 10

Because of the restrictions on starting activities from the background in Android 10, we have made NotificationHelper class build and show full screen notifications

See the following file for code details:

Getting started

To get started, you'll need to register a free Voximplant developer account.

You'll need the following:

  • Voximplant application
  • two Voximplant users
  • VoxEngine scenario
  • routing setup

Automatic

We've implemented a special template to enable you to quickly use the demo – just install SDK tutorial from our marketplace: marketplace

Manual

You can set up it manually using our Getting started guide and tutorials

VoxEngine scenario example:

require(Modules.PushService);
VoxEngine.addEventListener(AppEvents.CallAlerting, (e) => {
const newCall = VoxEngine.callUserDirect(
  e.call, 
  e.destination,
  e.callerid,
  e.displayName,
  null
);
VoxEngine.easyProcess(e.call, newCall, ()=>{}, true);
});

Installing

  1. Clone this repo

  2. Select AudioCall and build the project using Android Studio

Usage

User login

Log in using:

See the following files for code details:

Make or receive calls

Enter a Voximplant user name to the input field and press "Call" button to make a call.

See the following files for code details:

Audio call controls

Mute, hold, change an audio device or send DTMFs during a call.

See the following files for code details:

Useful links

  1. Getting started
  2. Voximplant Android SDK reference
  3. Installing Voximplant Android SDK
  4. HowTo's
  5. Push Notifications Tutorial

Have a question