Brownfield Integration
This page is for Android native apps that consume a React Native AAR produced with @callstack/react-native-brownfield.
These projects usually have this shape:
- The host
Applicationdoes not implementReactApplication - The host
Activitydoes not extendReactActivity - The React Native runtime is initialized inside the AAR module, usually through
ReactNativeHostManageror a similar class
Do not change the host app inheritance just to integrate Cresc. Wire Cresc where the AAR module creates ReactHost, ReactNativeHost, or ReactInstanceManager.
Install the dependency
Inside the React Native project root:
Make sure the AAR includes the react-native-update Android module. If autolinking does not include it in your library module, add it manually:
If PackageList(application).packages already includes UpdatePackage(), do not add it a second time.
Register UpdatePackage in the AAR module
The JavaScript API needs the Android native module. Confirm UpdatePackage is present where your AAR module creates the package list:
Configure ReactHost for the New Architecture
For RN 0.82+, or any brownfield module that initializes React Native with ReactHost / getDefaultReactHost, pass Cresc's bundle path into jsBundleFilePath:
assets://index.android.bundle is the fallback embedded bundle used when no OTA update has been applied. Match it to the actual bundle name packaged into your AAR.
Expose ReactHost from the host Application
In the New Architecture, Cresc needs to find the active ReactHost when switchVersion() or restartApp() reloads the RN runtime after an update.
If the host Activity is not a ReactActivity, and the host Application is not a ReactApplication, expose a public getReactHost() method from the host Application:
Cresc finds this method reflectively. The host Application does not need to implement ReactApplication.
Passing jsBundleFilePath is enough for cold starts. Exposing getReactHost() is what makes switchVersion() / restartApp() reliable for immediate runtime reloads in New Architecture brownfield apps.
Legacy architecture or custom ReactInstanceManager
If your brownfield integration still creates ReactInstanceManager manually, wire the bundle path there:
For New Architecture apps, prefer the ReactHost setup above.
Wrap the JavaScript root
The JavaScript side is the same as a regular React Native app:
Build and publish
- Rebuild the React Native AAR and make sure the host app consumes the new artifact.
- Build the final host APK / AAB.
- Upload the final host package with
cresc uploadApkorcresc uploadAab. - When publishing OTA updates, target the native version that matches the final host app's
versionNameand build timestamp.
Cresc updates JavaScript bundles and JavaScript assets. Native changes such as new native modules, Kotlin / Java changes, Manifest changes, or .so changes still require a new AAR and host app release.