This common-js module introduced the possiblity to show a alert and reminds the alert after a day (or the period you prefer).
- Add the
com.sensimity.ti.capabilityalert
module to themodules/commonjs
folder in your Titanium project - To show an alert, use the module as follows:
var alertDialog = require('com.sensimity.ti.capabilityalert');
var onClick = function (e) {
console.log('User clicks a button inside the alert dialog');
};
alertDialog({
title: 'Please update your application',
message: 'There is a new version available on the App Store',
key: 'update_alert',
tries: 3,
okMessage: 'Ok',
cancelMessage: 'Cancel'
remindAfter: 86400,// Remind a user after 1 day
onClick: onClick
});