0

Hi I am trying to implement a chat service using gcm. I follow the below link this I am able to register the device but not getting the message to the device, i got an output like this from the php side

{"multicast_id":4761920147140850331,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1396947152466532%978fee92f9fd7ecd"}]

i tried to send the message using http://gcm-alert.appspot.com/ getting a response success but not showing on the device.

I am using browser api key

Sukan
  • 346
  • 1
  • 3
  • 19
DKV
  • 1,767
  • 3
  • 28
  • 49

3 Answers3

3

the output shows the message is sent successfully, there is something wrong on application level, its hard to tell without any details, but make sure you are connected to internet and make sure that messages are not getting blocked by your firewall, it happened to me when I was testing my app on our corporate network

Syed Waqas
  • 862
  • 2
  • 9
  • 29
0

The output said that message send perfectly,

So question is that how to analyze problem,

  1. Please switch on data network mode (Data plan), switch off Wi-Fi connection,
  2. Then send to try again,
  3. now question is that you can not check that cause app is work in local web service,
  4. so, In GCMBaseIntentService class method name is onMessagem please print log on messages receive like this,
  5. protected void onMessage(Context ctx, Intent intent) { String message = intent.getStringExtra("message"); Log.d("Message=", }

Please check this all in mobile, and mobile are connected to system, and you can check all log, so, you can analyze clearly where is the problem.

Krunal Indrodiya
  • 782
  • 2
  • 7
  • 19
0

The message shows whtever you did on the server side is absolutely correct. Check your client side code. The manifest permissions should be accurate to receive messages from GCM

androidStud
  • 532
  • 4
  • 9