In-App Updates
Overview
Check update status, run Android Play update flows, and open the store when needed.
Call getUpdateStatus() first, then start only the flows the current install supports.
The same status shape works for Play Store installs, debug builds, sideloaded installs, and iOS. Android can start Play Core update flows when they are available. Other installs return unavailable states, so your app can fall back to the store page.
When To Use This
- Your Android app is distributed through Google Play and you need Play Core immediate or flexible update flows from JavaScript.
- For iOS, use the App Store page fallback to send users to the store.
- If you use Expo, this package needs a development build because Expo Go cannot load native modules.
Support Matrix
| Platform | Update flow | Store page | Install listener |
|---|---|---|---|
| Android installed from Google Play | Immediate + flexible | Yes | Yes |
| Android sideload/debug install | Not available | Play Store fallback | No |
| iOS | Not available | App Store fallback | Unsupported event only |
Features
- Check update availability, current app version, and store version details.
- Start Android immediate updates when Play policy allows them.
- Start Android flexible updates, track download progress, and complete the downloaded update.
- Open the Play Store or App Store as a fallback.
- Handle unsupported devices, unsupported install sources, user cancellation, and missing store metadata as typed results.
Public API
| Area | APIs |
|---|---|
| Status | getUpdateStatus, isUpdateAvailable |
| Android update flows | startImmediateUpdate, startFlexibleUpdate, completeFlexibleUpdate |
| Store fallback | openStorePage, canOpenStorePage |
| Flexible progress | addInstallStateListener, supportsInstallStateListener |
| Flow guards | canStartImmediateUpdate, canStartFlexibleUpdate, canCompleteFlexibleUpdate |
Start Here
- Install the package and Nitro peer dependency.
- Call
getUpdateStatus()before starting any update flow. - Use helper functions like
canStartImmediateUpdate(status)before starting a flow. - Use
openStorePage()as the iOS and unsupported-install fallback.
See the Quick Start for copy-paste examples, App Integration for a full React component, the API Guide for the status model and error handling, or Troubleshooting for common issues.