XamarinPlayCoreUpdater
XamarinPlayCoreUpdater copied to clipboard
in some devices OnActivityResult is called repeatedly after a successful Immediate update
When AppUpdateType.Immediate is used and after a successful in-app update the app enters a loop as OnActivityResult is repeatedly called in a loop.
Reproduced in Pocophone F1, Google Pixel 3a.
Check your StartActivityForResult calls. The sample might be buggy. I had this when I had an issue with the update due to certificate mismatch as you can see in the Readme.
Were you able to check the behavior again? I can verify it works just fine on the Pixel 3a and my production code. I will update the sample after my vacation if needed.
@PatGet found two issues on the sample. I can send you a PR until Fr. with my working version and you can review it.
Not sure if I'm getting the same issue, but using the test sample code.
i.e.
var availability = info.UpdateAvailability();
if ((availability.Equals(UpdateAvailability.UpdateAvailable) || availability.Equals(UpdateAvailability.DeveloperTriggeredUpdateInProgress)) && info.IsUpdateTypeAllowed(AppUpdateType.Immediate))
{
// Start an update
_appUpdateManager.StartUpdateFlowForResult(info, AppUpdateType.Immediate, _mainActivity, _update_request);
}
It seems to update fine, but it doesn't auto restart once it's installed. Am I missing anything?
@gsgou any update on this?
@gsgou
Cuando se usa AppUpdateType.Immediate y después de una actualización correcta en la aplicación, la aplicación entra en un bucle ya que OnActivityResult se llama repetidamente en un bucle.
Reproducido en Pocophone F1, Google Pixel 3a.
Please does anyone know how to solve this problem?