Setup and Basic Usage - Gruveo SDK for Android

Setup and Basic Usage

This page explains how you can get up and running quickly with the Gruveo SDK for Android.

Requirements

At least Android 4.2.x (API 17) is required.

The SDK manifest file contains the features and permissions below. You do not have to add them in your project.

The Manifest.permission.RECORD_AUDIO permission is mandatory for making calls, Manifest.permission.CAMERA is needed only for video calls. However, it is all handled by the SDK, so you do not have to worry about these details.

The SDK is minified with self-contained ProGuard rules, so you do not have to add any either.

Setup


Include JitPack by adding the following in your project’s build.gradle:

Add Gruveo SDK in your module’s build.gradle dependencies:

Add the following activity in your manifest file:

Launching a Gruveo Screen

The Kotlin snippet below launches a Gruveo screen to connect to the gruveorocks call room.

Let’s break down this example.

  • On lines 5-9, the Gruveo screen is initialized and instructed to connect to the gruveorocks call room. We also pass the demo client ID to the SDK to identify the SDK user, as well as bind an event listener object. Check out SDK Reference for more details on the initialization.
  • The event listener on lines 12-17 implements a mandatory handler for the requestToSignApiAuthToken event used for SDK authentication.
  • The signToken() method on lines 19-28 uses a server endpoint provided by Gruveo to sign tokens for the demo client ID as part of the SDK authentication scheme. Note that when using a production client ID, you will need your own endpoint as well as a way to authenticate your app with it.