简体   繁体   English

Phonegap 3.0及更高版本-是否有无需更新通知即可更新应用程序徽章的插件?

[英]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应用程序的标志。


What Has Worked Before 以前的工作
To achieve this in older versions of Phonegap/Cordova, I used the following plugin: https://github.com/phonegap/phonegap-plugins/tree/master/iOS/Badge 为了在老版本的Phonegap / Cordova中实现此目的,我使用了以下插件: https : //github.com/phonegap/phonegap-plugins/tree/master/iOS/Badge

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文档中有一个设置徽章的示例,但在这些方面我什么都看不到。


Does anyone know of a Phonegap3.0+ plugin to manually set of the badge number for an iOS app? 有谁知道一个Phonegap3.0 +插件来手动设置iOS应用的徽章编号?

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.

相关问题 在应用程序处于后台时使用推送通知更新徽章 - Update badge with push notification while app in background 是否可以在不通过iOS中的推送通知打开应用程序的情况下更新应用程序图标上的徽章编号? - Is it possible to update badge number on app icon without openining app on push notification in iOS? 更新推送通知徽章计数 - Update push notification badge count iOS Phonegap推送通知显示但没有声音或标志 - iOS Phonegap push notification shows but no sound or badge 在App未打开时收到推送通知时更新徽章编号 - Update Badge Number when push notification is received when App is not Open 在不显示推送通知的情况下增加应用徽章数量 - Increasing App badge count without showing push notification 在不运行应用程序或不发送推送通知的情况下为iOS应用程序添加徽章? - Badge iOS application without running the app or sending a push notification? 推送通知-应用徽章图标 - Push Notification - App Badge Icon 使用fcm插件的离子推送通知和徽章 - Ionic push notification and badge using fcm plugin 当应用在后台收到Phonegap(cordova)的推送通知时,增加徽章编号, - Incrementing badge number when app receives push notification in background state for Phonegap (cordova),
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM