Skip to content

Data Channels Android App

Ajša Terko edited this page Jan 1, 2024 · 1 revision

The Data Channels Showcase App demonstrates the use of the Infobip RTC Android SDK. It highlights features like:

  • sending a text to one or all endpoints in a room call when a data channel is enabled,
  • receiving a (direct) text in a room call when a data channel is enabled,
  • receiving a broadcast text in a room call when a data channel is enabled.

For developers seeking seamless integration, code samples are readily available in Kotlin for Android.

1. (Prerequisite) Running the Token App

The prerequisite to running any Showcase Apps is running the Token App, available in both Node.js and Java.

Token App - Node.js: Guidance

Create config.json file in the ./token/node project directory, and fill it with data:

{  
  "HTTP_PORT": 8080,
  "INFOBIP_API_HOST": "api.infobip.com",
  "INFOBIP_RTC_TOKEN_PATH": "/webrtc/1/token",
  "INFOBIP_API_KEY": "YOUR_API_KEY"
}

Then in the ./token/node project directory:

  • install needed dependencies by running:
npm install
  • start the application by running:
npm start
Token App - Java: Guidance

Export the INFOBIP_API_KEY environment variable and set it to your Infobip API key.

In the ./token/java project directory, start the application by running:

mvn spring-boot:run

2. Running the Showcase Apps

You can run the Showcase App on an Android emulator.

There is known issue with receiving push notifications for incoming calls on subsequent runs on emulator. To address this, it is recommended to wipe data on your emulator before running the app again.

Alternatively, it is possible to run the Showcase App on a physical mobile device. In this case, please consult a guide on exposing the localhost endpoints to the public Internet using ngrok.

Audio and Video Calls

Application Calls

Data Channels

Clone this wiki locally