Skip to main content

Android Developer Guide

Setup And Build

Download the release package and extract it in your projects folder. Then use the Android Studio to open the project:

img

Deploying License Key

After the project loads, navigate to app > res > raw , and place there a file called cloudonix_license_key.lic with the content of the license you have received from Cloudonix.

img

The file name should either be kept the same as in the Simple Call Example, or otherwise you can change the name of the file loaded by the sample application by editing the constructor of the VoIPImplClient class.

public VoipImplClient(Context ctx) {
InputStream lic = ctx.getResources()
.openRawResource(R.raw.cloudonix_license_key);

Required and Optional Libraries

The following libraries are required by the Cloudonix Mobile SDK for Android and must be included in the application's dependencies in order for the application to successfully initialize the Cloudonix Mobile SDK:

  • androidx.preference:preference - used to store SIP account settings for reuse after automatic restart.
  • com.squareup.okhttp3:okhttp - used for license verification and automatic device configuration.
  • com.squareup.okhttp3:logging-interceptor - auxiliary library for the okhttp client.
  • com.google.code.gson:gson - used for license verification and automatic device configuration, as well as some inter-service messaging.

The following libraries are optional and if provided will enable some features:

  • com.google.firebase:firebase-messaging and com.google.gms:google-services - automatic integration of serverless Registration-Free dialing using Firebase.
  • androidx.lifecycle:lifecycle-process - automatic VoIP service restart from background.

Build and Run

At this point you should be able to click the “Run” button to start the sample dialer application on a connected device or an emulated device.

img