integration with phonegap-plugin-push when on background
See original GitHub issueHello, I would like to know if there is a way to change the badge number when the app has been closed or still runs at the background (for android).
push.on('notification', function(data) {
console.log(data);
if(!data.additionalData.foreground)
{
cordova.plugins.notification.badge.set(10);
}
}
The above code doesn’t seem to trigger the badge.set function. I have tried to work with the phonegap-plugin-background-mode but I saw some people having issues with the Appstore, so I rejected that option. Could you guide me on how to do this? All I want is to be able to change the badge number when the app is not on the foreground. Regards
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
i want to get the push notification in background #2301 - GitHub
Expected Behaviour i want to get the push notification in background or when the app is closed Actual Behaviour push notification shows only ......
Read more >unable to integrate phonegap-plugin-push - Stack Overflow
I have done it for a phoneGap app, using this in config file for push notification plugin <plugin name="phonegap-plugin-push" spec="~1.10.5" ...
Read more >Integrating Cordova Plugin - Pushwoosh
1. Install the Plugin source code into your app: · 2. Whitelist . · 3. Get the google-services. · 4. Add the following...
Read more >Approved Plugins - VoltBuilder
Approved Plugins. These plugins can be used by VoltBuilder's Indy. Pro, and Enterprise plans. Need a plugin that isn't on the list? Let...
Read more >Marketing Cloud Cordova Plugin Push Notification Issue
Do you know where can I apply some functions when I tap on push notification received (app run in background)? e.g. redirect to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In case anyone is following this, the phonegap-plugin-push just updated yesterday with code to set badges on android: https://github.com/phonegap/phonegap-plugin-push/blob/master/CHANGELOG.md
Thanks @mlabarca !