phonegap-parse-plugin
phonegap-parse-plugin copied to clipboard
Notification in App?
Apologies, this is more of a question than an issue, but I haven't been able to figure this out for a while.
So using this plugin with parse, I am able to get messages that pop up as system notifications in iOS and Android. When I click on the notification, my app is opened. My question is, is there any way for the app to know that it's been opened in response to a notification? Is there any way for the app to recieve the notification message directly or indirectly?
+1
for android, I've been able to achieve this with https://github.com/Initsogar/cordova-webintent
and code similar to the following:
window.plugins.webintent.hasExtra("com.parse.Data",
function(has) {
if(has) {
window.plugins.webintent.getExtra("com.parse.Data",
function(d) {
console.log(d);
}, function() {
// There was no extra data supplied.
}
);
}
});
Thanks @timp80, your solution works fine. One question though, this intent does not seem to fire if I already am in the App when I get the Notification. Would be cool if I could jump to another page of my Phonegap App based on a Push Notification, any advise on that?