Android
Android Native SDK

Installation

build.gradle
dependencies {
// ... other dependencies ...
implementation 'io.cobrowse:cobrowse-sdk-android:2.+'
}
Add the following lines to your code which will register this device with the Cobrowse servers so you can connect to it. You could choose to do this on app startup, or when your users visits a support page in your application, or any other time.
import io.cobrowse.CobrowseIO;
...
CobrowseIO.instance().license("put your license key here");
CobrowseIO.instance().start(this);

Registering on startup

If you would like your devices to register as soon as your app starts, we recommend doing this in your custom Application subclass onCreate method. For example:
package com.example;
import android.app.Application;
import io.cobrowse.CobrowseIO;
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
CobrowseIO.instance().license("put your license key here");
CobrowseIO.instance().start(this);
}
}
If you do not have a custom Application subclass in your app yet, you will also need to modify your application manifest:
AndroidManifest.xml
<application
android:name=".MainApplication"
<!-- ... -->
</application>
You may also start Cobrowse in your MainActivity or other Activity if necessary. In that case, the SDK will continue to function even as new Activities are being created and destroyed.

Add your license key

Please register an account and generate your free License Key at https://cobrowse.io/dashboard/settings.
This will associate sessions from your mobile app with your Cobrowse.io account.

Try it out

Once you have your app running in the Android emulator or on a physical device, navigate to https://cobrowse.io/dashboard to see your device listed. You can click the "Connect" button to initiate a Cobrowse session!

Requirements

  • API version 19 (4.4 KitKat) or later
Due to OkHttp dropping support for Android 4.4 after its v3.12.x releases on December 31, 2021, support for Android 4.4 will likely be supported in 2.x releases of the Cobrowse.io Android SDK only.
Any questions at all? Please email us at [email protected].

Flutter Support

There is a community-built Flutter plugin: https://github.com/robodigital/cobrowseio_flutter.

Firewalls

If your agents work behind a firewall (e.g. a corporate firewall), then the agent-side API routes will need to be whitelisted as specified here: https://docs.cobrowse.io/enterprise-self-hosting/advanced/firewalls#agent-side-required-apis.