Skip to content

Android SDK - Initialization modes

The SDK has three init() overloads. Use exactly one.

Info

Contact Aurion11 to receive your host URLs and, if you use static or hybrid initialization, your configuration JSON.

Remote

The standard setup: the SDK fetches its config from your host URLs. See Installation.

A11.init(this, "YOUR_APP_KEY", listOf("https://your-host-url.com"))

Static

Use when your app has no backend config endpoint, or you don't expect config changes from the backend. The SDK uses only the JSON config you pass and never fetches a remote config.

A11.init(this, "YOUR_APP_KEY", staticConfig = "STATIC_JSON_CONFIG")

Hybrid

Use when you want ads available immediately, without waiting for a config fetch. The SDK starts from the seed config you pass, or from a previously cached remote config if there is one, and switches to the remote config from hostUrls once it's fetched.

A11.init(this, "YOUR_APP_KEY", staticConfig = "STATIC_JSON_CONFIG", hostUrls = listOf("https://your-host-url.com"))

Host URLs

The SDK uses only the host of each URL and ignores any path. If you pass several host URLs, the SDK tries them in order and uses the first one that responds.

Caution

Host URLs must use the HTTPS scheme, for example https://your-host-url.com.