You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
I've made a blank Cordova application and copied the files from example/www, I've added the push plugin using cordova plugin add phonegap-plugin-push. I've set up a GCM Server API key using the Google Developer Console, I've also created a project on there and copied the project ID to use as the sender ID.
I'm only trying to test the plugin with Android at the moment.
The app starts, after a few seconds it displays the registration ID. I copy it into an email and send it to myself. I paste that into a PushSharp application and send a test notification. Using Fiddler I can see the HTTP request to GCM and it comes back with a "success" response:
In LogCat I can see the message is received on the device, but it isn't displayed in the notification area when the app is the background and the notification event is not called. If the app is in the foreground, still the notification event never gets called.
This is the output from the the Android Device Monitor when the message is received:
Well I've just worked this out! I was passing an "alert" value for the message to GCM (as per PushSharp documentation), but it should have been called "message".
I've made a blank Cordova application and copied the files from example/www, I've added the push plugin using
cordova plugin add phonegap-plugin-push
. I've set up a GCM Server API key using the Google Developer Console, I've also created a project on there and copied the project ID to use as the sender ID.I'm only trying to test the plugin with Android at the moment.
The app starts, after a few seconds it displays the registration ID. I copy it into an email and send it to myself. I paste that into a PushSharp application and send a test notification. Using Fiddler I can see the HTTP request to GCM and it comes back with a "success" response:
In LogCat I can see the message is received on the device, but it isn't displayed in the notification area when the app is the background and the notification event is not called. If the app is in the foreground, still the notification event never gets called.
This is the output from the the Android Device Monitor when the message is received:
I'm not sure what else I need to do to get this to work, or whether it's a bug?
The text was updated successfully, but these errors were encountered: