Skip to main content

Bundled UI and OTA updates

The rewards UI can be served two ways:

ModeHowUpdates
Hosted (default on iOS)Loaded from Flyy's CDNAlways the latest
Bundled (auto-detected on Android)Shipped in your appOver the air (OTA)

Bundled mode opens instantly and works offline. OTA means UI fixes and new campaign layouts reach users without an app release.

Bundle the UI​

Copy the web build into src/main/assets/flyy-dist/. Flyy.start detects it and logs which mode it's in under the FlyySDK tag.

How OTA works​

  • Checks on every launch. When nothing changed, the cost is one small manifest request.
  • Downloads only from your configured origin, over TLS. Every file is checked against the manifest's sha256.
  • A failed or interrupted update leaves the current build untouched. One previous version is kept.
  • A build older than the one inside your app is never installed.

API​

Flyy.getOtaVersion() // version being served

Flyy.checkForOtaUpdate(object : FlyyDataCallback {
override fun onSuccess(data: JSONObject) {
// {"status": "updated" | "up_to_date" | "skipped", "version": …}
}
override fun onFailure(message: String) { }
})

Flyy.start(this) { partnerId = "…"; otaEnabled = false } // pin the bundled build

:::tip Testing a new bundled build An active OTA build takes priority over the files in your app. To test a freshly bundled build, clear app data (or delete and reinstall the app) first. :::