Skip to content

Android SDK

This document applies to our SDK version 3 for Android.

Integration Requirements

The SDK supports devices with these minimum requirements:

  • At least Android API 21 (Lollipop 5.0).

Supported CPU architectures

  • arm64-v8a
  • armeabi-v7a
  • x86
  • x86_64

Known limitations

Emulation support

Android Studio default emulators may not work properly with our Edge Delivery Service. We highly recommend you trying other emulators or simply testing with real mobile devices.

CPU architectures

Our SDK depends on third party native code libraries. If you use additional native code libraries in your app, please take the this into account:

Android's way of managing multiple native code libraries bundled within the same app is as follows:

  1. When you launch an app in a phone / device, Android searches through all of the bundled libraries for the closest CPU architecture to the device's actual CPU.
  2. Any library that doesn't specifically support that CPU architecture may not load, even if it supports a backward compatible CPU.

For example: An app uses two libraries, supporting the following architectures:

  • Library #1: arm64-v8a, armeabi-v7a, x86, x86_64.
  • Library #2: armeabi-v7a, x86, x86_64.

If you try the app in a phone with an armeabi-v7a CPU, it may run fine. But, the very same app in a phone with an arm64-v8a CPU may fail to load library #2.

You should make sure that all libraries that you include in your project, or get included as dependencies, support at least the CPUs listed at Requirements.

Integration sample

A reference integration sample application can be obtained from here. Once you download the repository, import it in Android Studio using the Import project... option from the menu. When you are ready, build and run the application. The required parameters and order of operations are described in detail below.

Downloads

The Android SDK is automatically downloaded when adding the corresponding dependency in the build.gradle file, as explained in the following section. Please contact System73 Support for Android SDK download information.

Adding our SDK to your project

Permissions

Add the following permissions in your project's AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Arbitrary HTTP Loads

By default, the application will prevent non secure HTTP requests. Open the AndroidManifest.xml and add the following code to allow arbitrary HTTP requests.

<application 
    ... 
    android:usesCleartextTraffic="true"
    ...>

Gradle setup

To integrate the SDK, first set up the System73 Maven repository in the project's build.gradle file:

allprojects {
   repositories {
       // ... other repositories
       maven {
           url "https://artifacts.s73cloud.com/repository/maven-s73-releases"
       }
   }
}
  • Then add the following sentence inside the dependencies section of the module's build.gradle file:
implementation 'com.system73.polynet:polynet-android-sdk:3.9.0'

This will automatically download and import the SDK and all its required dependencies in your Android project.