Is there a way to use GCM in Android without a dedicated server?

I am conceptualizing an Android application that sends data from one device to another (for example, a picture message), but since I do not have a server, I am looking at other ways of messaging. Google Cloud Messaging (GCM) seems like a good choice as it is built for Android and has the right to use it, but you still need a server to use it. Is there a way around this requirement, for example, starting the GCM server in the application itself? Or is there a better approach to server messaging on Android?

+7
source share
2 answers

I think it will be difficult to do what you want efficiently without a server, but you can check out the Parse SDK. You can free up to a certain monthly limit.

Documentation. You can read "Submit clicks on channels" and "Using advanced targeting."

+1
source

Yes, you can - it can send the same messages from the device that will be sent from the server. However, this has the following problems:

  • You put your API key in your application so that someone can decompile the APK to get it.
  • Your users need a way to share their GCM registration IDs with each other. If both users had both of their identifiers expiring at the same time, there would be no way to share them.

Indeed, it will take about an hour to write your application and post it on AppEngine, and cost less than $ 10 per month, even for a ton of users.

For an example of a dead simple Java message server, check out a server that supports one of my applications:

https://github.com/charlesmunger/touch-to-text-server.git

+3
source

All Articles