learningAndroid
- Forum posts: 1
Jul 16, 2013, 11:43:52 PM via Website
Jul 16, 2013 11:43:52 PM via Website
Hi,
I am new to Android programming.am trying to implement an android app(push notification) which uses the latest Google Cloud Messaging API.
The explanation on the Getting Started page is somewhat confusing and i feel it is outdated too(correct me). The questions that i have are:
1. When we register our device with GCM server I get a "Service not available exception". But I also get the registrationId (10%) of the times. Dont know how to debug or the cause behind this.
2. How do we implement the server side implement for this. The google doc says we need to have an http header and body where we specify the format of message(json or plain text) and body with the message we want to send to GCM server. But I found out on Google that if we include gcm-server.jar we could simply use the Sender and Message classses to this. Do we have to consider the format for header and body with the Sender and Message classes too.
3. How can we handle the errors once we send a message to GCM server from our app server.
I hope i put my question correctly and hope it makes sense.
Please do help me out..Struggling with these from about 2-3 weeks..no proper guidance..
I am new to Android programming.am trying to implement an android app(push notification) which uses the latest Google Cloud Messaging API.
The explanation on the Getting Started page is somewhat confusing and i feel it is outdated too(correct me). The questions that i have are:
1. When we register our device with GCM server I get a "Service not available exception". But I also get the registrationId (10%) of the times. Dont know how to debug or the cause behind this.
2. How do we implement the server side implement for this. The google doc says we need to have an http header and body where we specify the format of message(json or plain text) and body with the message we want to send to GCM server. But I found out on Google that if we include gcm-server.jar we could simply use the Sender and Message classses to this. Do we have to consider the format for header and body with the Sender and Message classes too.
3. How can we handle the errors once we send a message to GCM server from our app server.
I hope i put my question correctly and hope it makes sense.
Please do help me out..Struggling with these from about 2-3 weeks..no proper guidance..
— modified on Jul 16, 2013, 11:45:04 PM