This plugin is now compatible with ionic.
This pluging enabels In app update For cordova.
- Flexible update
- Immidiate update
- Stalneess days For both type of updates
- Priority updates
Note : Stalness days: How many times the user has already been asked to update. Setting it to 0 will trigger update flow on the 1st attempt.
- flexibleUpdateStalenessDays : Provide stalness days for flexible update
- immediateUpdateStalenessDays : Provide stalness days for immidiate update
stalness will be ignored in this case
- If priority of released app is >= 3 it will trigger Immidiate update
- If priority of released app is >= 1 it will trigger Flexibke update
Note: To determine priority, Google Play uses an integer value between 0 and 5, with 0 being the default, and 5 being the highest priority. To set the priority for an update, use inAppUpdatePriority
field under Edits.tracks.releases
in the Google Play Developer API. Priority can only be set when rolling out a new release, and cannot be changed later.
window.plugins.updatePlugin.update({
flexibleUpdateStalenessDays:0,
immediateUpdateStalenessDays: 100000
});
window.plugins.updatePlugin.update({
flexibleUpdateStalenessDays: 100000,
immediateUpdateStalenessDays: 0
});
window.plugins.updatePlugin.update({
flexibleUpdateStalenessDays: 2,
immediateUpdateStalenessDays: 5
});