Reputation: 2217
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
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.
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.
Use Firebase Remote config for the above purpose. Return a value that specifies the update type. Refer this answer.
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