phonegap android localnotification plugin display nothing

别来无恙 提交于 2019-12-12 03:54:19

问题


I have followed this: localnotification android phonegap for cordova 2.x+ getting nothing in device: here is some results of my 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)

Here is the code of html page and every thing follow from the above mentioned link

<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

回答1:


Check out https://github.com/Wizcorp/phonegap-plugin-localNotifications

It is regularly maintained and is used in production games by Wizcorp.



来源:https://stackoverflow.com/questions/16417660/phonegap-android-localnotification-plugin-display-nothing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!