githubEdit

Whereby Android SDK

The Whereby Android SDK is available through Jitpackarrow-up-right and can also be found on GitHubarrow-up-right. It loads the Whereby web component through a WebView and integrates with your editor to make it easier to customize the Whereby Embedded experience. You can also hook into powerful features, such as listening to room events and sending commands to the room from the host application. This gives you the possibility to implement your own controls. Media permissions are already handled in the SDK.

Quickstart guide

This guide shows you how to embed a Whereby room in a native Android app using the Whereby Android SDK. For a complete running example, checkout our Android SDK demo apparrow-up-right repository.

Prerequisites

This guide assumes that you’ve already created a Whereby Embedded account and a meeting room. If you’ve not already taken these steps, you can do so by following the Whereby Embedded initial setup guide.

Setting up the app

To start, open the latest version of Android Studio and create a new project with an empty Activity, keeping the recommended settings.

Installing the Whereby SDK

The framework is distributed using Jitpackarrow-up-right. If it is not already the case, add the Maven and Jitpack repositories to your Android project. This can be done either in the project build.gradle file (not to be confused with the module build.gradle file) or in the settings.gradle file:

repositories {
    ...
    mavenCentral()
    maven { url 'https://jitpack.io' }  
}

Then, add the Whereby SDK dependency to your module build.gradle file. You can specify either a full name X.X.X version (see the list of released versionsarrow-up-right), or simply use a range format X.+:

Remember to sync your project after updating the gradle files.

Implementing the main activity

Unlike the WebView approach, there is no need to manually set up permissions — these are already handled by the SDK.

Replace the app's main Activity with the code below, and update the URL in the example to your own Whereby room URL.

Testing the app

Run the app in Android Studio, and you should see your Whereby instance running, allowing you to join the room with both camera and microphone enabled.

circle-info

This is a minimal implementation. It is recommended to extend the configuration to improve the user experience. For example, you can:

  • Send commands to the WherebyRoomFragment to toggle the camera or microphone, allowing you to implement your own controls.

  • Listen for room events, such as when the user leaves the room, to redirect them to the previous screen.

For a complete example that support both Activity and Fragment, check out our public repository: android-sdkarrow-up-right-demoarrow-up-right.


Last updated

Was this helpful?