3

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.

Bathiya M
  • 31
  • 2

2 Answers2

0

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.

0

You can use launch mode = single task and it will fix the problem

apollosoftware.org
  • 12,161
  • 4
  • 48
  • 69
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 15 '22 at 17:10