My Android app does in-app updates and they've been working fine until the last few weeks. Until recently my app would update and get relaunched by the Play Store, but now my app gets updated then its process is killed but there's no relaunch.
This is my call to manage the update.
appUpdateManager.startUpdateFlowForResult(appUpdateInfo, this,
AppUpdateOptions.newBuilder(AppUpdateType.IMMEDIATE).build())
This is the sequence of events I see during the update flow.
Launch app, app detects an update is available
Launch update flow and go to the Play app
Up until this point I've seen the following lifecycle events
onCreate() onResume() onPause()
Click on the "Update" button, download gets to 100%
Play Store says "installing...", I see this in LogCat
PROCESS ENDED (17634) for package com.my.app
My app never received
onStop() onDestroy()
My app never received another
onCreate() onResume()
Is there something new I need to do for in-app updates to work like they used to?
My Android app does in-app updates and they've been working fine until the last few weeks. Until recently my app would update and get relaunched by the Play Store, but now my app gets updated then its process is killed but there's no relaunch.
This is my call to manage the update.
appUpdateManager.startUpdateFlowForResult(appUpdateInfo, this,
AppUpdateOptions.newBuilder(AppUpdateType.IMMEDIATE).build())
This is the sequence of events I see during the update flow.
Launch app, app detects an update is available
Launch update flow and go to the Play app
Up until this point I've seen the following lifecycle events
onCreate() onResume() onPause()
Click on the "Update" button, download gets to 100%
Play Store says "installing...", I see this in LogCat
PROCESS ENDED (17634) for package com.my.app
My app never received
onStop() onDestroy()
My app never received another
onCreate() onResume()
Is there something new I need to do for in-app updates to work like they used to?
Share Improve this question asked Mar 13 at 4:28 BunglesBungles 2,2752 gold badges33 silver badges62 bronze badges1 Answer
Reset to default 0you must check which result you are getting first: RESULT_OK
, RESULT_CANCELED
or ActivityResult.RESULT_IN_APP_UPDATE_FAILED
For immediate updates, you might not receive
RESULT_OK
callback because the update should already be finished by the time control is given back to your app.
When you call appUpdateManagerpleteUpdate() in the foreground, the platform displays a full-screen UI that restarts the app in the background. After the platform installs the update, your app restarts into its main activity.