徽章编号未显示在phonegap android的本地通知中

时间:2014-05-15 08:15:52

标签: android cordova phonegap-build

这是我的本地通知代码。我被卡住了......请帮助..

function showlocalnotify(){
            window.plugin.notification.local.add({
                id:         1,  // A unique id of the notifiction
                date:       _5_seconds_from_now,    // This expects a date object
                message:    "Generated notification",  // The message that is displayed
                title:      "Notification",  // The title of the message
                //repeat:     'minutely',  // Either 'secondly', 'minutely', 'hourly', 'daily', 'weekly', 'monthly' or 'yearly'
                badge:      1,  // Displays number badge to notification
                sound:      'TYPE_ALARM',  // A sound to be played
                json:       JSON.stringify({ test: 123 }),  // Data to be passed through the notification
                autoCancel: true, // Setting this flag and the notification is automatically canceled when the user clicks it
                //ongoing:    Boolean, // Prevent clearing of notification (Android only)
                icon: 'icon.png'
            });

0 个答案:

没有答案