google api - GCM: cannot send message from python script -
i'm following this tutorial send gcm message server via python script.
i've downloaded gcmdemo can send messages using project num, server api key , reg id.
but no way python.
i've registered client:
06-13 09:47:45.682 2272-32480/com.google.android.gcm.demo i/gcmdemo﹕ registration succeeded. senderid: 11xxxxxxx07 token: fxq...xxxx..r5
my server api key:
the python script on server:
from gcm import * gcm = gcm("aiza...xxx...xq") data = {'ciao ciao': 'test message', 'param2': 'value2'} reg_id = 'fxq...xxxx..r5' gcm.plaintext_request(registration_id=reg_id, data=data)
no error messages no messages received.
is there way log , see problem ?
the client doesn't react (log on android studio set verbose, no log @ all).
any idea ?
the google project console shows logs till 30 may.
i'm not using python anymore switched php had same problem there , solved adding icon
field "data". adding like:
data = {'icon' : '@drawable/myawesomeicon', ...}
should solve problem.
Comments
Post a Comment