0

Currently I'm using in app updates to check if there is an update to an application. Specifically AppUpdateManager.getAppUpdateInfo, but it requires to get called (and it's usually called during onCreate()), but I need to subscribe to get updated the moment the app is updated on Play Store, in order to know when to call getAppUpdateInfo(). I could set a recurrent task to check it, but I find it inefficient.

Is there any way that I can do this? I'm using Firebase so I tried to update a value in Firestore during CI and listen to it in the app, triggering it, but there is a delay between uploading the new app and it becoming available on the Play Store, and so far I haven't found a way to trigger a webhook or similar from Play Store when the app is live.

Is there any other option that I'm missing?

IAmJulianAcosta
  • 1,082
  • 2
  • 14
  • 30
  • This seems unnecessary. Isn't the whole point of in-app updates to be *in-app*? – Henry Twist Apr 25 '21 at 00:30
  • 1
    The updates will still be in-app, I'm just need to need a way to _notify_ the app that there is an available update to open the dialog, instead of polling several times to check if there is one – IAmJulianAcosta Apr 25 '21 at 00:32
  • I think this defeats the point. The page you linked describes them being used as a prompt when a user opens the app, providing they have background updates turned off. It would be strange if Android facilitated a workaround for background updates being deliberately disabled? – Henry Twist Apr 25 '21 at 00:35
  • The prompt is shown after getAppUpdateInfo() is called, what I need to know is when to call it, a lot of tutorials usually call that method in onCreate(), but if there is no update at the time the method is called, and the user keeps the app open (my use case), so there is no way I can show the prompt unless I keep calling getAppUpdateInfo() (what I'm trying to avoid) – IAmJulianAcosta Apr 25 '21 at 00:41
  • Oh I see, so you want to make sure the app can be updated in case there's an update whilst they're using it? Isn't that quite a rare occurrence and a non-issue? – Henry Twist Apr 25 '21 at 00:53
  • Is rare for a normal app, but my app stays open _almost forever_ as it's the only installed and user never leaves it, and there are cases where I need to detect the update and show the prompt – IAmJulianAcosta Apr 25 '21 at 00:58

0 Answers0