XamarinPlayCoreUpdater icon indicating copy to clipboard operation
XamarinPlayCoreUpdater copied to clipboard

in some devices OnActivityResult is called repeatedly after a successful Immediate update

Open gsgou opened this issue 5 years ago • 7 comments

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.

gsgou avatar Sep 07 '20 10:09 gsgou

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.

PatGet avatar Sep 07 '20 14:09 PatGet

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 avatar Sep 21 '20 08:09 PatGet

@PatGet found two issues on the sample. I can send you a PR until Fr. with my working version and you can review it.

gsgou avatar Sep 22 '20 23:09 gsgou

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?

winstonpang avatar Oct 26 '20 23:10 winstonpang

@gsgou any update on this?

saamerm avatar Dec 31 '20 21:12 saamerm

@gsgou

saamerm avatar Feb 22 '21 04:02 saamerm

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?

Juvelio avatar Jan 17 '23 23:01 Juvelio