Update Strategies

Choose your update strategy according to your business model

Status Bar (default)

  • PushLink.setCurrentStrategy(StrategyEnum.STATUS_BAR);

  • Title message: "New version of [App Name]"

  • Description message: "Click to Update"

  • Remains on the status bar until the installation happens.

  • Clear the message if the admin changes back to an earlier version before the installation.

Friendly Popup (useful for full-screen apps)

  • PushLink.setCurrentStrategy(StrategyEnum.FRIENDLY_POPUP);

  • Default message: "New version of [App Name]. Do you want to update it?".

  • Default buttons: [Not Now][Update].

  • It remains until the user presses [Not Now] or [Update] (The back button is blocked).

  • Default reminder: 3 hours

  • Hide the popup if the admin changes back to an earlier version before the installation.

Don't forget to call PushLink.setCurrentActivity(this); inside onResume

Annoying Popup (useful for full-screen when updates can't wait)

  • PushLink.setCurrentStrategy(StrategyEnum.ANNOYING_POPUP);

  • Default message: "For security reasons [App Name] needs to be updated!"

  • Default button: [Update].

  • Very insistent. It remains until the user presses [Update] (The dismiss button is blocked).

  • Hide the popup if the admin changes back to an earlier version before the installation.

Don't forget to call PushLink.setCurrentActivity(this); inside onResume

Custom (take complete control of your installation)

  • PushLink.setCurrentStrategy(StrategyEnum.CUSTOM);

  • When using the CUSTOM strategy, pushlink doesn't display anything and will broadcast two actions.

  • [your.package.name].pushlink.APPLY is sent EVERY 30 seconds (more or less) when there is a downloaded but not applied new APK. The user has to handle those multiple broadcasts.

  • [your.package.name].pushlink.GIVEUP is sent ONCE when the user gives up the update (in the web admin) before it has been applied.

It is useful when the requirement is building a fancier and more modern notification, executing extra steps, or performing a silent background update.

Background

  • Installing APK without user interaction

  • Silent updates

  • Zero-touch updates

  • KIOSK apps

  • POS - Point of sale apps

  • Dedicated devices

  • COSU - Corporate Owned Single Use devices

Learn how to update apps in the background with CUSTOM strategy.

Idle

Sometimes, you want to avoid undesired popups, notifications, or restarts during user interaction.

By default idle is true . This means the installation will start after the new APK download.

If you call PushLink.idle(false) , Pushlink will never fire the installation process.

Knowing that you can switch this value to control updates.

Customization

You can customize the built-in strategies like this:

Last updated