私はこれに従いました:コルドバ 2.x+ の localnotification android phonegap はデバイスで何も取得しません: これが私の console.log の結果です:
05-07 21:04:20.218: E/dalvikvm(21039): threadid=5: stuck on threadid=12, giving up
05-07 21:04:20.218: D/dalvikvm(21039): threadid=5: sending two SIGSTKFLTs to threadid=12 (tid=21062) to cause debuggerd dump
05-07 21:04:22.218: D/dalvikvm(21039): Sent, pausing to let debuggerd run
05-07 21:04:22.867: A/libc(21039): Fatal signal 16 (SIGSTKFLT) at 0x0000522f (code=-6)
ここにhtmlページのコードがあり、すべてが上記のリンクから続きます
<script type="text/javascript">
document.addEventListener("deviceready",appReady, false);
function appReady() {
window.plugins = {
LocalNotificationPlugin: cordova.require( 'cordova/plugin/localNotification' )
};
console.log("Device ready");
alert("");
var now = new Date();
now.setSeconds(now.getSeconds() + 90);
window.plugins.LocalNotificationPlugin.add({
date :now,
message : "Phonegap - Local Notification\r\nSubtitle comes after linebreak",
ticker : "This is a sample ticker text",
repeatDaily : false,
id : 4
});
}
</script