skip to Main Content

I’m trying to add Google Play Core flexible update to the app i’m working on. As stated in the documentation in Android website app should restart automatically to main activity after completing the update process when you call completeUpdate method in foreground. When I test this in different devices, app in some devices restart automatically but in others app closes and do not reopen. There is nothing to distinguish between app reopened and app didn’t open devices. For an example, I tested app with samsung A32 device and app restarted then tested with samsung s20 and app didn’t restart. Both devices have Android 11 OS version.

2

Answers


  1. I faced this issue and after 2 days I added

    android:launchMode="singleTask"
    

    to the launcher Activity And I used

    ProcessPhoenix.triggerRebirth(this)
    

    From ProcessPhoenix library in OnActivityResult And then the app restarted after updating.

    Login or Signup to reply.
  2. You can use launch mode = single task and it will fix the problem

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search