Akhil Soman
Akhil Soman

Reputation: 2217

Android - In-App Updates. Where to specify whether an Update(new apk uploaded to playstore) should be an IMMEDIATE or FLEXIBLE type update?

Currently in my app i would like to implement both the IMMIDIATE and FLEXIBLE flow for updates. What is the process of setting a new update as IMMEDIATE or FLEXIBLE? Or more precisely is there an option in playstore for doing this? Because currently both

isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)

returns true for a new update.

Upvotes: 1

Views: 414

Answers (1)

Akhil Soman
Akhil Soman

Reputation: 2217

Currently at the time of writing this answer, there is no option in playstore to specify whether an update(new apk) is IMMEDIATE or FLEXIBLE. But one can implement it via the following methods.

  1. Since both

isUpdateTypeAllowed(AppUpdateType.FLEXIBLE) isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)

return true for a new update, you can create an API which returns whether there is a new update based on the applications current version code/name, and whether it should be IMMEDIATE/FLEXIBLE.

  1. Use Firebase Remote config for the above purpose. Return a value that specifies the update type. Refer this answer.

  2. There are new features or signals coming to playstore(at the time of writing) that can solve this issue. Please refer to this video on youtube.

Upvotes: 1

Related Questions