In-App Update API
Enable in-app updates using the WebToNative JavaScript API. Prompt users to update your Android app without leaving the application.
const { InAppUpdate } = window.WTN;
InAppUpdate.checkIfAppUpdateAvailable({
callback: function(data) {
//your logic
}
});
InAppUpdate.updateApplication({
updateType: "immediate", //immediate or flexible
callback: function(data) {
}
});import { InAppUpdate } from "webtonative";
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
Check If App Update Available
Checks whether an update is available for the app.
Callback Response:
It will return two keys isUpdateAvailable (boolean) and latestVersion (string).
Show In-App Update UI
Displays a native in-app update prompt UI to the user. This allows you to trigger the platform's native update dialog and receive the result via a callback.
Callback Response:
It will return three keys: type (string), isUpdateAvailable (boolean), and latestVersion (string).
type
string
Always "showInAppUpdateUI"
isUpdateAvailable
boolean
Whether an update is available
latestVersion
string
The latest version available on the store
For Example:
*Android and iOS for checkIfAppUpdateAvailable and showInAppUpdateUI support from 12/03/2026
Last updated