phonegap-parse-plugin icon indicating copy to clipboard operation
phonegap-parse-plugin copied to clipboard

Notification in App?

Open aviks opened this issue 10 years ago • 3 comments

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?

aviks avatar Jan 28 '15 12:01 aviks

+1

0x5d avatar Mar 31 '15 19:03 0x5d

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.
            }
        );
    }
});

timp80 avatar May 14 '15 03:05 timp80

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?

dmastag avatar Sep 08 '15 18:09 dmastag