1
나는이 플러그인을 작동 시키려고 노력하고 있지만 저에게는 효과가 없습니다.Phonegap 시스템 알림 플러그인
https://github.com/saileshmittal/phonegap-system-notification-plugin
나는 메신저는 자바 스크립트 파일에서 플러그인을 호출 잘못된 일을 생각한다. 이것은 내가 지금까지 가지고있는 것이다.
var not_title = 'MELVIN';
var not_text = 'Zou dit werken?';
var not_tText = 'of toch niet?';
navigator.systemNotification.onBackground();
//navigator.systemNotification.onForeground();
navigator.systemNotification.createStatusBarNotification(not_title, not_text, not_tText);
//navigator.systemNotification.updateNotification(not_title, not_text, 1);
이것은 아래에있는 SystemNotification.js에있는 것입니다.
PhoneGap.addConstructor(function() {
if (typeof(navigator.systemNotification) == "undefined") {
navigator.systemNotification = new SystemNotification();
navigator.systemNotification.touch(); //this ensures that the plugin is added when phonegap kicks off
}
//PhoneGap.addPlugin("systemNotification", new systemNotification());
PluginManager.addService("systemNotification", "com.SystemNotification.SystemNotification");
});
내가 뭘 잘못하고 있니?
"onBackground"를 명시 적으로 호출하기 때문에 앱이 포 그라운드에있을 때 시스템 알림을 받고 싶다고 가정합니다. 콘솔 로그를 작성해주세요. 알림 방법과 그것이 호출되는지 확인하십시오. 또한 README에서 말하는 모든 것을 수행하고 있는지 확인하십시오. – Sailesh