Android project ID and API key - can be obtained here
Some android app that registers to GCM and sends registration id to backend API
Really simple to implement - no magic
Small library - 179 lines of code
It makes use of Google Cloud Messaging
Can be used both for Android and iOS (we tested only with Android)
Google Cloud Messaging might be not viable for you if you require very low latency - see Messenger case study
Add to Gemfile:
And run bundle install
Add API key to sec-config.yml:
environment: google_gcm_api: some1cool1key1here
Now we can make use of GCM and send some notifications. In the snippet below you can find some example service object that takes registration ids (that need to be pushed by mobile clients to your backend API) and message hash which is just message that will be included in notification.
Android client has to be listening to those notifications by using broadcast receiver. What it will do with those notifications will depend on business logic of your application. Sample code for such application can be found here.
I hope you like it! If you have any comments or ideas how to improve it, please share them below.