Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Arjan de Vries <arjandevries-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>
Subject: Re: Plugin for Android Google Cloud Messaging Push Notifications on Cordova
Newsgroups: gmane.comp.handhelds.phonegap
Date: Thursday 18th October 2012 15:06:15 UTC (over 5 years ago)
First of all thanks for your library :) I got it working in combination 
with a statusbarnotification plugin.
Everything is working fine, except for when the application is not running,

when closing it or rebooting the phone.

If i monitor LogCat in Eclipse, i can see that a javascript function is 
being called when a message is received:
i.e.: 10-18 16:52:18.667: V/GCMPlugin:sendJavascript(3994): 
javascript:GCM_Event({"message":"blahblah","event":"message"})
When the app is closed i can see the following line in the log:
10-18 16:53:10.948: V/GCMPlugin:sendJavascript(4381): 
javascript:null({"message":"blahblah","event":"message"})

I think the problem is that the javascript cannot be executed if the apps 
not running. Another user on SO suggested that I should comment the line
GCMPlugin.sendJavascript( 
json ); in GCMIntentService.java, and write my own notification code in 
Java. 
I dont know where to begin in Java so i was wondering if anyone tried this.

In the meantime i installed the pushwoosh library, and that seems to work. 
Even when i reboot the phone i still receive notifications, even with the 
nice logo of my app in front of it. Only problem here is that you have to 
pay to use it, and my business is still too small do be able to do this. 



Op dinsdag 10 juli 2012 18:15:30 UTC+2 schreef Mark Nutter het volgende:
>
> I recently forked Awysocki's C2DM-PhoneGap plugin so that I could update 
> it to work with Google Cloud Messaging since C2DM has been deprecated and

> also updated it to work with Cordova, so I thought I'd pass it along to 
> this google group:
>
> https://github.com/marknutter/GCM-Cordova
>
> Let me know if you have any questions but it's pretty straightforward to 
> add it to your project.
>

-- 
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to
phonegap-/[email protected]
To unsubscribe from this group, send email to
phonegap+unsubscribe-/[email protected]
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com

To compile in the cloud, check out build.phonegap.com
 
CD: 4ms