Skip to main content

Setting up Development Environment

LLM Prompts Available

For LLM-assisted SDK integration, see the Android Prompts section. Step-by-step and integrated prompts are available.

Dependency Setting

To use the FLOWER SDK in your Android project, add the library to Gradle dependencies through AnypointMedia's Maven repository.

repositories {
   maven(url = "https://maven.anypoint.tv/repository/public-release")
}

...

dependencies {
    implementation("flower-sdk:sdk-android-ott:X.X.X")
}

Additional Dependency for Media3 ExoPlayer (FlowerMedia3ExoPlayer)

If your app uses Media3 ExoPlayer via FlowerMedia3ExoPlayer, you must add a Media3 version-specific companion artifact in addition to the core sdk-android-ott dependency.

Starting from version 2.9.16, the FLOWER SDK separates the Media3 adapter into per-version artifacts to avoid binary compatibility issues caused by Media3 API differences between versions. The companion artifact depends on sdk-android-ott, so both must be added together — the companion alone is not sufficient.

Supported androidx.media3 versions: 1.6.0 and above. Choose the artifact that matches the androidx.media3 version used by your app:

Your androidx.media3 versionArtifact to add
1.6.0 and aboveflower-sdk:sdk-android-ott-media3-{androidx.media3-version}:X.X.X
dependencies {
implementation("flower-sdk:sdk-android-ott:X.X.X")

// Required only when using FlowerMedia3ExoPlayer.
// Pick the artifact that matches your androidx.media3 version.
implementation("flower-sdk:sdk-android-ott-media3-1.10.1:X.X.X")
}
note

The core sdk-android-ott artifact is always required. The sdk-android-ott-media3-* artifact is only needed when integrating with Media3 ExoPlayer through FlowerMedia3ExoPlayer, and it depends on sdk-android-ott. If you use FlowerExoPlayer2 (legacy ExoPlayer) or FlowerBitmovinPlayer, you do not need to add it.

info

If your project uses an androidx.media3 version that is not covered by the artifacts listed above (for example, versions below 1.6.0), please contact us at dev-support@anypointmedia.com.

Android Cleartext Traffic Exception Configuration

When using the FLOWER SDK, a specific domain must be configured as a cleartext traffic exception in order for the SDK to communicate properly over HTTP. Starting from Android 9 (API level 28), cleartext (HTTP) traffic is blocked by default.

You can choose one of the two methods below:

  1. Allow cleartext traffic for a specific domain using Network Security Config (Recommended)
  2. Enable cleartext traffic globally using usesCleartextTraffic="true"

1. Create Network Security Config File

Create the following file:

app/src/main/res/xml/network_security_config.xml

2. Add the Following Configuration

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">
prod-reds-device-ad-distributor.ap-northeast-2.elasticbeanstalk.com
</domain>
</domain-config>
</network-security-config>

cleartextTrafficPermitted="true" → Allows HTTP traffic only for this domain.

includeSubdomains="true" → Also allows all subdomains (set to false if not needed).

3. Apply It in AndroidManifest.xml

Add the following inside the <application> tag:

<application
android:name=".MyApplication"
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="false"
... >

This approach limits HTTP access to the specified domain only and is more secure.

You can enable HTTP for all domains by setting:

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

Important Notes

  • This allows HTTP traffic for all domains.
  • In this case, Network Security Config is not required.
  • This approach is not recommended for production environments due to security risks.

(Reference) Android Version Behavior

Android VersionBehavior
API 28+ (Android 9+)HTTP blocked by default
API 27 and belowHTTP allowed by default