AnilS
AnilS

Reputation: 689

GCM refresh registration id frequently

I am using the GCM to send data to android app, Whenever New Device is login, My cloud web server stores the GCM registration ID in database until again it's logout if User Data is available in my web server database it will send GCM notification to the device Whenever device receives the GCM notification it will send request for the data then web server sends the data and remove that user data from the database it is working fine, But randomly some GCM notifications and data are missing and I am not getting this lost data anymore, This user data is very important to my customers and needs to send that as soon as possible, I am not able to find where the problem exactly?

I think problem with the GCM refresh registration id frequently, is this right??Here is the GCM registration logs from my web server

127.0.0.1 - - [16/Sep/2015:20:02:43 +0000] "POST /RegisterGCM?regid=APA91bGV8N30yt6dYCxdX_RFdSBIujLd-omLju_qKrFkKuOjFWxT--2zBfkHbYXL95yq3UHGEK7TfBgX18ZdBffB7-SCVjDv460aVukRJ2j4uY44021T7x_5I-g&kid=17 HTTP/1.1" 200 43
127.0.0.1 - - [16/Sep/2015:20:02:43 +0000] "POST /RegisterGCM?regid=APA91bGV8N30yt6dYCxdX_RFdSBIujLd-omLju_qKrFkKuOjFWxT--2zBfkHbYXL95yq3UHGEK7TfBgX18ZdBffB7-SCVjDv460aVukRJ2j4uY44021T7x_5I-g&kid=17 HTTP/1.1" 200 43
127.0.0.1 - - [16/Sep/2015:20:02:44 +0000] "POST /RegisterGCM?regid=APA91bGV8N30yt6dYCxdX_RFdSBIujLd-omLju_qKrFkKuOjFWxT--2zBfkHbYXL95yq3UHGEK7TfBgX18ZdBffB7-SCVjDv460aVukRJ2j4uY44021T7x_5I-g&kid=17 HTTP/1.1" 200 43
127.0.0.1 - - [16/Sep/2015:20:03:23 +0000] "POST /RegisterGCM?regid=APA91bGV8N30yt6dYCxdX_RFdSBIujLd-omLju_qKrFkKuOjFWxT--2zBfkHbYXL95yq3UHGEK7TfBgX18ZdBffB7-SCVjDv460aVukRJ2j4uY44021T7x_5I-g&kid=17 HTTP/1.1" 200 43

Can anyone help me to fix this problem? Thanks in advance...

Upvotes: 1

Views: 189

Answers (1)

AniV
AniV

Reputation: 4037

It looks like your GCM notification is exceeding the Pyaload limit of 4096 bytes. Check that the total size of the payload data included in a message does not exceed GCM limits: 4096 bytes for most messages, or 2048 bytes in the case of messages to topics or notification messages on iOS. This includes both the keys and the values.

The app server can send a message including both notifications and data payloads. In such cases, GCM handles displaying the notification payload and the client app handles the data payload.

One more possibility is that, the GCM supports for upto 1000 recipients for a single message, so if this limit is exceeded that are changes that the messages are trimmed. Make sure that you send the messages in batches.

Upvotes: 0

Related Questions