Android のネイティブ アラートをテストしています。
showAlert: function (message, title) {
if (navigator.notification) {
navigator.notification.alert(message, null, title, 'OK');
} else {
alert(title ? (title + ": " + message) : message);
}
},
initialize: function() {
var self = this;
//Phonegap alert
self.showAlert('Store Initialized', 'Info');
//Stadard Alert
alert('Store Initialized');
}
showAlert() と alert() はまったく同じ警告ウィンドウを生成します。では、なぜ phonegap のネイティブ アラート機能を使用するのでしょうか。