admin管理员组

文章数量:1391987

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.

  1. Launch app, app detects an update is available

  2. Launch update flow and go to the Play app

  3. Up until this point I've seen the following lifecycle events

    onCreate()
    onResume()
    onPause()
    
  4. Click on the "Update" button, download gets to 100%

  5. Play Store says "installing...", I see this in LogCat

    PROCESS ENDED (17634) for package com.my.app
    
  6. My app never received

    onStop()
    onDestroy()
    
  7. 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.

  1. Launch app, app detects an update is available

  2. Launch update flow and go to the Play app

  3. Up until this point I've seen the following lifecycle events

    onCreate()
    onResume()
    onPause()
    
  4. Click on the "Update" button, download gets to 100%

  5. Play Store says "installing...", I see this in LogCat

    PROCESS ENDED (17634) for package com.my.app
    
  6. My app never received

    onStop()
    onDestroy()
    
  7. 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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

you 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.

本文标签: Why doesn39t Android Play Store relaunch my app after an inapp updateStack Overflow