Я пытаюсь заставить этот плагин работать, но он не будет работать для меня.
https://github.com/saileshmittal/phonegap-system-notification-plugin
Я думаю, что я делаю что-то не так с вызовом плагина в файле Javascript.Это то, что у меня пока есть;
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");
});
Что я делаю не так?