In App Update - Android

Functions to control the in app update options in the app.

You'll need to import the javascript file in your website before starting from this link.

const { InAppUpdate } = window.WTN;

InAppUpdate.checkIfAppUpdateAvailable({
    callback: function(data) {
        //your logic
    }
});

InAppUpdate.updateApplication({
    updateType: "immediate", //immediate or flexible
    callback: function(data) {
        
    }
});

In checkIfAppUpdateAvailable it will return two keys isUpdateAvailable (boolean) and latestVersion (string)

For Example:- { "isUpdateAvailable": true, "latestVersion": "2.0.1" }

In updateApplication it will return a key updateStatus (string) Values:- UPDATE_CANCELLED or UPDATE_STARTED

For Example:- {"updateStatus":"UPDATE_CANCELLED"}

*Feature added in Android on 02/07/25

Last updated

Was this helpful?