App doesn't restart automatically after completing Android's in-app flexible update process in some devices

Viewed 342

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.

1 Answers

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.

Related