0

I want to implement Google In-App Updates dynamically inside my application, Does Google Play console provide anything through which we can decide to AppUpdateType of the App. which can be IMMEDIATE or FLEXIBLE.

Gaurang Goda
  • 3,394
  • 4
  • 20
  • 29

2 Answers2

0

Google Play In App Updates allow you to notify the user that an update is available through the playstore.

IMMEDIATE is to signify that the PlayStore is to block the use of your app and ensure the update happens immediately.

FLEXIBLE means that the update can be downloaded in the background and your app can continue to be used until the update is ready to be installed.

Using IMMEDIATE or FLEXIBLE is a choice you make in your application for how you want the Playstore to behave. (It is not something that is sent to your app as an instruction from the PlayStore.)

Ref:

Docs


There is this video from Android Developer Summit 2019:

https://www.youtube.com/watch?v=_o_q6hatcIs&t=567s

That explains an update to this API will be coming soon, which will allow you to also send a "priority" flag for the update. i.e. something like, if your app is told there is an update of priority 5, you can choose to not notify the user, a priority of 7 you might show a dismissable dialog and a priority of 10 you may show a blocking dialog.

enter image description here

This feature is not yet available.

Blundell
  • 75,855
  • 30
  • 208
  • 233
  • @Gaurang If you found this helpful pls remember to upvote or mark it as answered https://stackoverflow.com/help/someone-answers – Blundell Feb 15 '20 at 23:08
0

I don't know the Kotlin syntax, but in Java, I declare a variable:

    private int updateMode = AppUpdateType.IMMEDIATE; //.FLEXIBLE or .IMMEDIATE

Then, close to where the app starts up, I use that variable to setup the Update Manager. You could programmatically change updateMode prior to this next step conditionally based on some business criteria if you wish:

        updateManager = new AppUpdate(mainContext, updateMode, parentView);

        updateManager.checkForUpdate();
Michael Dougan
  • 1,698
  • 1
  • 9
  • 13