php - Not getting push notification from GCM eventhough response is success -
i want push notification using gcm, things done properly, api
key & others.
i'm getting following success message, not getting notification on mobile(device id proper, tried on different divices)
{"multicast_id":6811225836747189127,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1395652805845432%ae8ef3eff9fd7ecd"}]}
may know correct way achieve objective? thanx in advance
manifest code``
<permission android:name="com.demo.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.demo.permission.c2d_message" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <receiver android:name="com.google.android.gcm.gcmbroadcastreceiver" android:permission="com.google.android.c2dm.permission.send" > <intent-filter> <!-- receives actual messages. --> <action android:name="com.google.android.c2dm.intent.receive" /> <!-- receives registration id. --> <action android:name="com.google.android.c2dm.intent.registration" /> <category android:name="com.demo" /> </intent-filter> </receiver> <service android:name="com.demo.gcmintentservice" /> ``
i faced same problem. should check "send id" should in code:
string sender_id = "1090629393827";
that number project id.
...also try allow ip on google project page , check api key. reaseon sending data trought browser had use browser api key no server api key.
and if using emulator check firewall setting!
sorry english it's not first language.
Comments
Post a Comment