Skip to content

Android SDK

This document applies to our SDK version 3.20.8 for Android.

Integration Requirements

The SDK supports devices with these minimum requirements:

  • At least Android API 21 (Lollipop 5.0).

Supported CPU architectures

The SDK supports these CPU architectures:

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

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

The SDK declares the permissions it needs in its own manifest, so they are merged into your app automatically:

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

Local HTTP proxy (mandatory)

The SDK runs a local HTTP endpoint inside your app. getLocalManifestUrl() returns a manifest URL of the form http://localhost:<port>/..., which is the URL the player loads. Calling dispose() stops this endpoint.

Apps targeting API 28 or higher block cleartext HTTP by default, so on Android 9+ devices playback fails unless your app allows cleartext traffic to localhost.

The SDK does not set android:usesCleartextTraffic or android:networkSecurityConfig in its manifest, so it never conflicts with your app's own security settings. You must allow the local proxy in your app's network security configuration. Only localhost and 127.0.0.1 are needed. All other traffic keeps your app's policy.

Important

This step is mandatory. Without it, the player can't load the local manifest URL on Android 9+ devices and playback fails.

If your app already has a network security config, add this block to your existing file:

<!-- Required by the System73 Edge Intelligence SDK: local proxy only -->
<domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="false">localhost</domain>
    <domain includeSubdomains="false">127.0.0.1</domain>
</domain-config>

If your app doesn't have one yet, create res/xml/network_security_config.xml:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="false">localhost</domain>
        <domain includeSubdomains="false">127.0.0.1</domain>
    </domain-config>
</network-security-config>

and reference it from the <application> element of your AndroidManifest.xml:

<application
    android:networkSecurityConfig="@xml/network_security_config"
    ... >

Notes:

  • minSdkVersion below 24 is supported. android:networkSecurityConfig is applied on Android 7.0 (API 24) and later. Older devices ignore it and already allow cleartext traffic by default. Lint may report an UnusedAttribute warning. This is safe to ignore.
  • Exact <domain> entries take precedence over your <base-config>. You can keep <base-config cleartextTrafficPermitted="false"> for the rest of your app.
  • When a network security config is present, Android 7.0+ ignores android:usesCleartextTraffic. Configure cleartext only in the XML file.
  • Setting android:usesCleartextTraffic="true" for the whole app also works, but we don't recommend it, because it allows cleartext to every host.
  • If your stream (manifest/CDN) URLs use plain http://, add those domains to the same <domain-config> too. https:// streams need nothing extra.

Large Heap

The default heap size for Android apps is deliberately constrained to ensure equitable memory distribution among various applications on a device. However, scenarios arise where the SDK requires caching a brief video data interval, potentially exceeding the heap limit due to varied video encoding segment sizes. To address this, you can enable a larger heap size by setting android:largeHeap="true" in the AndroidManifest.xml file. This adjustment grants the app permission to request expanded memory allocation from the system. Open the AndroidManifest.xml and insert the following code snippet under application tag to implement this modification.

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

Gradle setup

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

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.20.8'

This will automatically download and import the SDK and all its required dependencies in your Android project. The artifact is published with its POM and Gradle Module Metadata (.module), plus checksums, so Gradle resolves its transitive dependencies automatically.

Requirements:

  • minSdkVersion 21 (Android 5.0) or higher
  • Java 8 (sourceCompatibility / targetCompatibility JavaVersion.VERSION_1_8) or higher
  • Media3 integration: the SDK is built against androidx.media3 1.4.1
  • ExoPlayer 2 integration: the SDK is built against com.google.android.exoplayer 2.19.1 (not bundled; your app provides it)

This section was last updated 2026-12-03