Currently C2DM has moved to GCM, and i am in an starting stage in using GCM, can any one guide me what are the process to use GCM in android, how to register the device.
thanks in advance.
Check out this post. It shows the end to end process of registering your app with Google, setting up the client code, and sending notifications via GCM to your Android device.
http://fryerblog.com/post/30057483199/implementing-push-notifications-with-gcm
Related
I have created an android application for which i want to send push notification to the app users using GCM. Have read that GCM doesn't use Mobile numbers to send notification to app users. My question is that how can i use GCM to send notification to specific users,and also can some one help with procedure of setting up GCM for android Apps?
Thanks in advance !
First of all you should read the documentation as Aditay Said.
GCM communicates with your app using your pacakge signature and app id which you provided in googole developer console.
Here is a helpful link for you , This will help you to achieve your goal
https://neurobin.org/docs/android/push-notification-gcm-client-server/
N.B: Don't forget to accept my answer if you got your answer
I follow this link PLease see here . Can anyone tell me exact process to communication between two mobile devices in terms of push notification. Please help me.
GCM is a google cloud messaging http server.It is used for providing notification service on android phones any notification you receive on your phone is sent through GCM.Every device using a specific application is registered with GCM. Even if you want your application to send notification to the user on occurrence of something it's not possible without GCM.
I am new to the push notification subjet for android and I have an application with a .net web server as well as a remote database. I want to send a notification to all users which opens in a new intent. I have read about GCM and other third party platforms, but I was confused when they mention device registration ID, as I do not know how to get all the ids of all devices installing the app I am developping. Any straightforward tutorial or code helping me solve the confusion please.
Thank you in advance.
May be this can not provide complete answer to your question asked. But still it can help you.
GCM process works in this way.
at the first launch, your application will get the registration id from Google GCM server and give it to application server. Now the application server has all the registration ids in which your app is running.
Now you can easily dispatch push message for all devices.
I am using https://github.com/Redth/PushSharp
Registration with GCM works fine, however if I unregister, the device still receives push notifications.
All I have done is downloaded the push sharp source from https://github.com/Redth/PushSharp, and replaced my project ID as suggested in the example solution.
Could anyone familiar with GCM please suggest if they have experience anything similar, which is after unregistering, they still receive push notification from Google, and suggest a workaround/fix.
Thanks
Your problem have two solutions :
On Unregister mark registration false for that device on your server database.Or,
unregister broadcastreceiver from your app.
im developing a app in android. I want to send a push message when the client app is currently running. how can i achieve this with Google cloud messaging. or any other methods? but i want to send the push message at app running stage as well as the app closed. thanks in advance. hope someone will help me...
delay_while_idle attribute in gcm message will make GCM Server send message when device is not idling.
Read about cloud messaging it will help to fully understand how this service works. http://developer.android.com/guide/google/gcm/index.html
You cannot push message on the client side.
You can send REST HTTP data to a server.
On server side - use gcm-server library for pushing gcm messages.