In-App Updates is a method for your application to check with the store as to whether there is a newer version of your application available. Although some users enable background updates when their device is connected to an unmetered connection, other users may need to be reminded to update.
This feature allows you to check and prompt active users to update your app.
You will need to add the common Play Core extension (
And add the following to the manifest additions inside the
For Huawei you will need to add the
com.huawei.hms.game Huawei Mobile Services extension and add the following to your manifest additions:
Check if supported
Only certain services support In-App Updates:
- Google Play
- Huawei AppGallery
You can use the
isSupported flag to check whether the current device and service supported In App Updates:
Check for an update
To check for an update, call
checkAppUpdate() and await one of the events:
InAppUpdatesEvent.CHECK_APP_UPDATES_SUCCESS: dispatched when the check was completed successfully
InAppUpdatesEvent.CHECK_APP_UPDATES_FAILED: dispatched if there was an error performing the check.
If successful you can use the details in the event to determine if there is an update available:
If an error occurred you can use the
message fields to understand the issue:
Start an update
If there is an update available, you can start the in app update process by calling
With internal app sharing, you can quickly share an app bundle or APK with your internal team and testers by uploading the app bundle you want to test to the Play Console.
You can also use internal app sharing to test in-app updates, as follows:
- On your test device, make sure you've already installed a version of your app that meets the following requirements:
- The app was installed using an internal app sharing URL
- Supports in-app updates
- Uses a version code that's lower than the updated version of your app
Follow the Play Console instructions on how to share your app internally. Make sure you upload a version of your app that uses a version code that's higher than the one you have already installed on the test device.
On the test device, only click the internal app-sharing link for the updated version of your app. Do not install the app from the Google Play Store page you see after clicking the link.
Open the app from the device's app drawer or home screen. The update should now be available to your app, and you can test your implementation of in-app updates.