Tutorial by Examples

Send a message using GCM HTTP connection server protocol: https://gcm-http.googleapis.com/gcm/send Content-Type:application/json Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA { "to": "/topics/foo-bar", "data": { "message": "T...
Implement onMessageReceived that will catch the notification sent from GCM server. @Override public void onMessageReceived(String from, Bundle data) { String message = data.getString("message"); Log.d(TAG, "From: " + from); Log.d(TAG, "Message: "...
To receive the notification, implement application:didReceiveRemoteNotification:fetchCompletionHandler: (or application:didReceiveRemoteNotification: for iOS < 8.0), and call GCMService:appDidReceiveMessage:message to acknowledge the reception of the message to GCM. - (void)application:(UIApplic...

Page 1 of 1