Skip to content

Android SDK

The Diffusion Android SDK is a version of the full Java SDK, which has been repackaged for compatibility in the Android ecosystem.

AndroidFull API Documentation (opens in new tab)AndroidCode examples (GitHub) (opens in new tab) Android SDK in the Diffusion manual (opens in new tab)

Usage

The Android client is compatible with Android KitKat and later.

To compile the Diffusion Android APK within a gradle project, add the following to your build.gradle file:

groovy
apply plugin: 'com.android.application'
android {
  compileSdkVersion 27
  defaultConfig {
    multiDexEnabled true
    applicationId "com.pushtechnology.android.example"
    minSdkVersion 19
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
  }
buildTypes {
  release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  }
}
compileOptions {
  coreLibraryDesugaringEnabled true
  sourceCompatibility JavaVersion.VERSION_1_8
  targetCompatibility JavaVersion.VERSION_1_8
  }
}
repositories {
  maven {
  url "https://download.diffusiondata.com/maven/"
  }
}
dependencies {
  coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
  implementation 'org.slf4j:slf4j-api:1.7.21'
  implementation 'com.pushtechnology.diffusion:diffusion-android-client:6.12.0'
}

More information and guidance can be found at the Diffusion manual link above.