[英]Phonegap Local notification doesn't do anything
我目前正在嘗試使用此插件
我的問題是我做了所有從Google獲得的分步說明,但沒有一個起作用。
此步驟有問題嗎:
碼:
function onDeviceReady() {
window.plugin.notification.local.add({ message: 'Great app!' });
}
我正在使用相同的插件,最后我檢查了是否沒有“ .add”方法。 嘗試“ .schedule”
嘗試:
cordova.plugins.notification.local.schedule({
title: "New Message",
message: "Hi, are you ready? We are waiting.",
sound: "file://sounds/message.mp3",
icon: "http://my.domain.de/avatar/user#id=123"
});
https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling
我正在使用此插件,它工作正常。 您可以嘗試:
cordova.plugins.notification.local.schedule({
id: 1,
title: "Customer Calling",
icon: "http://b2bvn.nsbg.foxconn.com:8080/taxi/call.png",
text: "You have a registration from customer"
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.