[英]Phonegap 3.0 and newer - Is there a Plugin to Update the App Badge without a Push Notification?
I am trying to update the badge for a Phonegap 3.1 iOS application. 我正在尝试更新Phonegap 3.1 iOS应用程序的标志。
Why that no longer works 为什么那不再起作用
Plugins in Phonegap 3.0+ are now installed via the command line. 现在可以通过命令行安装Phonegap 3.0+中的插件。 I'm under the impression that the plugin above (which has a "last updated" time of over a year ago) is not compliant with the new plugin install process.
我的印象是,上述插件(“上次更新”时间已超过一年)不符合新插件的安装过程。
What I've Thought to Try So Far 到目前为止我一直想尝试的
I thought to try and run phonegap local plugin add https://<path to the git repo>
just incase the plugin still worked with 3.0+, but I can't seem to find the address of the actual repo. 我想尝试运行
phonegap local plugin add https://<path to the git repo>
以防万一该插件仍可与3.0+一起使用,但我似乎找不到实际仓库的地址。
I was hoping the Phonegap 3.0 documentation would have an example of setting the badge, but I don't see anything along those lines. 我希望Phonegap 3.0文档中有一个设置徽章的示例,但在这些方面我什么都看不到。
https://github.com/katzer/cordova-plugin-badge https://github.com/katzer/cordova-plugin-badge
window.plugin.notification.badge.clear();
window.plugin.notification.badge.set(0); // alternative
Pretty simpel. 漂亮的simpel。 Can also be installed via CLI .
也可以通过CLI安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.