Registering and sending messages is a multistage process when using AirBop cloud messaging for Android. This blog post will walk you through those steps, providing a general overview of the AirBop push notification service and how it fits in with the Google Cloud Messaging service.
The first step happens on the Android device. Assuming that this is the first time your users started your app, your app will attempt to register with the Google Cloud Messaging (GCM) servers.
If your app successfully registers with the GCM servers, the GCM servers will generate a registration Id for your app and send it back. The registration Id is a string value that will uniquely identify your app on that one specific device. If it’s helpful you can think of this as being the “address” of the app on the phone that GCM will use to locate your app in the future.
If your app receives the registration Id from the GCM servers, then it has successfully been registered on GCM. The next step is to register with the AirBop servers. To register with AirBop your app needs to send the registration Id (along with other optional paramters) to the AirBop servers.
If everything is successful your app should now be registered with both AirBop and GCM. The logical next step would be to send a message from the AirBop servers down to your app. In order to target your app, AirBop will send the message using the registration Id to direct the message to your app. The message will first go from AirBop’s servers to the GCM servers, and then be delivered to your app by the GCM servers.
If the registration Id is valid, the GCM servers will send the message to the correct app on the correct device.
In the final step the message has been successfully delivered to your app and your app will analyze the message and perform the task needed.
To add push messaging to your Android apps, head on over to http://www.airbop.com and signup for a free account. Right now you can get 1000 managed devices plus unlimited push messages for free!