Confused about Live Update

If I set the Live Update mode to Background, that basically means it will download the new update in the background and wait for the app to be in the background for x # of seconds before applying it. But what does “apply it” mean? Will that restart the app so the new version is running?

My questions:

  1. The first time a user starts my app, they will be using the old code that was part of the binary pushed to the app/play store, correct? Is there any way to force an update the first time the app is started, then use background every time after?

  2. With background mode, does that mean that the new version will not be live until the user restarts the app?

Via this, the update is applied in one of 2 ways: The next time they launch the app, or after the app has been in the background for the duration specified by min-background-duration.

Yes, that’s basically an “app restart” - the entire app is reloaded to apply the new changes.

The first time a user starts my app, they will be using the old code that was part of the binary pushed to the app/play store, correct? Is there any way to force an update the first time the app is started, then use background every time after?

Yes, the first time will use the code deployed to the app stores. Forcing an update, you’d have to use the auto update setting. to accomplish what you’re asking, you’d:

  • Ship the app with “auto” update mode set.
  • on app load, write a function that calls the Configure method of the Live update API, changing the update mode to “background.”

The next time they launch the app or the app has been in background for the duration specified my min-background-duration the new version will be loaded.

How can I set min-background-duration so that it never refreshes until the user re-loads the app?

Either set the min-background-duration extremely high or by using “auto” mode (with the caveat that it will block the user until it’s completely loaded and applied the new update)

I’m still having difficulty understanding the background mode. What I have experienced is the following:
Even when putting my app in the background for min_background_duration the updated version is not applied until I relaunch the app. Now, in real life, a lot of my app users just have the app in the background and don’t close the app so it might take some time till they see the updated version, but my main purpose for implementing app flow was to have immediate updates to the app (vs auto-update which might take time).

  1. What have I misunderstood?
  2. How can i achieve the above?