This guide walks you through adding an in-app update check to an existing React Native screen. By the end you will have a working component that callsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/aravind3566/react-native-in-app-updates/llms.txt
Use this file to discover all available pages before exploring further.
checkForUpdate, reads the resolved string, and handles every documented error case — all in TypeScript.
How it works
checkForUpdate returns a Promise<string>. On Android it communicates with the Google Play In-App Updates API and resolves or rejects depending on what the API reports. Passing UpdateFlow.FLEXIBLE starts a background download; passing UpdateFlow.IMMEDIATE shows a full-screen update interstitial that the user must complete before continuing.
Install the package
If you have not already installed the library, add it now and rebuild your Android app:See the Installation guide for Yarn/pnpm instructions and native module verification.
Import checkForUpdate and UpdateFlow
Both exports come from the same entry point:
UpdateFlow is a TypeScript enum with two members:Call checkForUpdate inside useEffect
Trigger the check when your component mounts. Wrap the call in
async/await inside a named function so you can use try/catch:Handle the resolved values and error codes
The promise resolves with one of the following strings, or rejects with a structured error:
Read
| Outcome | Type | Value |
|---|---|---|
| No newer version in Play Store | Resolve | "No update available" |
| Flexible download initiated | Resolve | "Flexible update started" |
| Immediate update completed | Resolve | "Update flow finished" |
| User dismissed the immediate prompt | Reject | code UPDATE_CANCELLED |
| Activity context is unavailable | Reject | code NO_ACTIVITY |
| Play Core check call failed | Reject | code UPDATE_CHECK_FAILED |
| Operation not allowed | Reject | code NOT_ALLOWED |
e.code in your catch block to differentiate recoverable conditions (e.g. UPDATE_CANCELLED) from hard failures (e.g. NO_ACTIVITY).Complete TypeScript component
The example below mirrors the pattern used in the library’s own example app. It tracks status text and a loading flag, and exposes buttons for both real Play Store checks and offline mock tests usingFakeAppUpdateManager.
The second argument to
checkForUpdate is the optional isMock flag. When true, the library uses Android’s FakeAppUpdateManager instead of the real Play Core client. This lets you test all update paths locally without a Play Store listing — no network connection or published app required.Next steps
Now that you have a working update check, explore the two flow-specific guides for deeper coverage of completion callbacks, user prompting, and cancellation handling:Flexible Update Guide
Handle background download completion, trigger the install prompt, and manage the update lifecycle.
Immediate Update Guide
Handle
UPDATE_CANCELLED gracefully and decide whether to re-prompt or surface a manual update link.