Android setup
Load the latest verified OTA bundle in Android release builds.
Point React Native at the OTA bundle
kotlin
// android/app/src/main/java/<your/package>/MainApplication.kt (React Native 0.76+ template)
import dev.fireota.reactnative.FireOTA
override val reactHost: ReactHost by lazy {
getDefaultReactHost(
context = applicationContext,
packageList = PackageList(this).packages,
// Release builds load the latest verified OTA bundle; debug builds keep using Metro.
jsBundleFilePath = if (BuildConfig.DEBUG) null else FireOTA.getJSBundleFile(applicationContext),
)
}Which snippet do I need?
If your MainApplication calls getDefaultReactHost(context, packageList, …) — the default since React Native 0.76 — use the first tab (verified on 0.87). Projects that still override reactNativeHost use the Kotlin or Java tab.
What happens at launch
- A pending update is promoted and must confirm the launch by reaching FireOTA.configure().
- A bundle that reaches a second launch without confirming is rolled back to the previous one.
- Installing a new APK/AAB from the store discards every older OTA bundle automatically.
- Applying an update immediately performs a cold restart of the app process.