I want to use google GCM for sending message from device A to device B. My app does not use any other server. The GCM will generate registration id for devices. How to send the message to a particular device (From A to B) among a number of devices.
For sending push notifications, you need a senderid and server key registered with google.
You could possibly send the push notification to GCM from the device itself, but will have to keep the server key in the source code for the App. Depending on your level of code obfuscation, anyone can eventually get the server key, and take over push notifications pretending they are your app. Good luck.
In reply to AKS ............. What we are looking at here is a de-centralized or peer-to-peer system .. There are registration ids associated with each device(as per GCM)... one way is using p2p algorithms all devices maintain a 'ledger' of all registration ids and specify which ones to send a particular message to. Of course, other possibilities also exist depending on application logic and feasibility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With