Skip to main content

Android Installation Instructions

  1. Ensure your device has Android 7.1 or higher
  2. Ensure that mavenCentral() is in the project-level build.gradle file like so:
buildscript {    repositories {        mavenCentral()    }}
  1. In the individual module build.gradle file add:
dependencies {    // ...    implementation "live.ditto:ditto:latest.release"}
android {    // ...
    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }}
  1. Configure your manifest with the following permissions:
<uses-permission android:name="android.permission.BLUETOOTH" /><uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /><uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /><uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /><uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /><uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
  1. Register your license token as below. We recommend placing this in your Application.onCreate method:
val androidDependencies = DefaultAndroidDittoDependencies(applicationContext)val ditto = Ditto(androidDependencies)ditto.setLicenseToken("<ditto_license_token>")