Joh*_*ner 1 push-notification ios cordova
看起来可能有一个现有的cordova解决方案,但除了cordovaBadge插件之外我找不到它 - https://github.com/katzer/cordova-plugin-badge - http://ngcordova.com/docs /插件/徽章/
问题是由于与LocalNotifications冲突,我不得不删除此插件.(好像我不能同时拥有它们)
cordovaBadge有一个简单的.hasPermission()方法.在cordova库中还有什么可以做到这一点吗?
你可以使用isRemoteNotificationsEnabled()
的方法科尔多瓦诊断-插件:
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled){
console.log("Push notifications are " + (isEnabled ? "enabled" : "disabled"));
}, function(error){
console.error("An error occurred: "+error);
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1774 次 |
最近记录: |