Push notifications (home badges) supported by PhoneGap? - mobile

I have read the documentation from phonegap saying its support some push notifications features http://wiki.phonegap.com/w/page/37159628/Notifications
May I know whether its possible to have "home badge" push notifications using PhoneGap?

I am not sure if you have come right yet but this might help you with android.
Link to android push notification
I havent tried this myself but i am looking for a home badge method for the iphone using phonegap

It's possible with the Cordova Push Notifications Plugin.
This plugin provides you with a convenient callback for push notifications, where you can set the application icon badge accordingly, e.g.:
//push notifications callback function
function onNotificationAPN (event) {
//handle push message
if (event.badge) //a badge number is provided in the push message
{
//set the application icon badge number accordingly
pushNotification.setApplicationIconBadgeNumber(successHandler, errorHandler, event.badge);
}
}

Related

React Native & Firebase Cloud Messaging: How to avoid duplicated push notification?

I have one website(React) and mobile app (React Native) which are both connected with the same Firebase Projects.
I have a button inside my Website; every time I click the button, my application receives a push notification from firebase (Firebase Cloud Messaging).
However, in case of slow internet connection or browser gets refreshed, my user is able to send a duplicated push notification.
How do I avoid this duplicated push notifications situation? In other word, I want to replace the old push notification every time I get a new push notification.
You can clear all notification before showing new notification. Version 6 do not handle provide functionality to remove notification. But you can use version 5. It has cancelAllNotifications method. You can also use react-native-push-notification.

send image in push notification

I've only sent texts in push notification till now. Can I send images as well in cn1? And how can I open a specific screen through clicking push notification? Up to now, it only opens the home screen of the app.
There is an RFE for supporting rich push notifications here. It's currently pretty bare of use cases so I suggest adding those as it's scheduled for the next update.

Push Notification Ionic. How to handle data of multiple notification?

I have implemented a push notification on my ionic app using cordova push notification.
The whole Notification part is done. I receive notifications properly, but the problem is when I receive multiple notifications for eg.
If I have 3 notifications in ascending order
message1
message2
message3
And if I clicked on 1st notification which is 'message1'. Further app gets open and it shows me 'message3'.
No matter whichever notification I'll click, it always shows a last notification which was received.
I'm not getting how to catch a data of notification on which I had clicked
(Is it possible by local notification plugin? which has onclick function.)
PLEASE HELP

Pushing pictures with push notifications (ngCordova, Angular, Ionic)

Recently, I have come across some apps, that are able to show me a picture (in addition to some text) in the application drawer / lock screen when a push notification arrives. I would like to know if it is possible to implement this with Ionic / Angular / ngCordova stack.
Even if the PushNotification retrieves the image property, I think the local notification is not able to display an image at the moment.
The question has already been asked in the cordova-plugin-local-notifications plugin GitHub Issues:
https://github.com/katzer/cordova-plugin-local-notifications/issues/536
but it hasn't been answered.

Is there any method like Iphone's application didfinishlaunchingwithoptions in Windows Phone 7?

I am implementing push notification WP7 it coming successfully in my application.I am executing specific code after receiving the notification.But the problem is that when the application is in background or closed and the push notification arrives at that time only the application's first page is coming.I want to execute the code when the application starts by notification.
In Iphone there is a method applicationdidfinishlaunchingwithoptions, in this method we can check whether the application is started by push notification or not.
Is there any method like that in WP7?
For a push notification, you set a uri for navigation. Add a url parameter to this, and handle it in the OnNavigatedTo method.

Resources