google cloud messaging - Android GCM doesnt register device -
code:
string msg = ""; try { if (gcm == null) { gcm = googlecloudmessaging .getinstance(orfografapplication.this); } string senderid = constants.gcm_sender_id; gcm_registration_id = gcm.register(constants.gcm_sender_id); msg = "device registered, registration id=" + gcm_registration_id; setregistrationid(orfografapplication.this, gcm_registration_id); } catch (ioexception ex) { log.w(tag, ex.getmessage()); msg = "error :" + ex.getmessage(); } return msg;
exception message service_not_available
in logcat : w/gcm(749): dir: /data/data/com.google.android.gms/app_app /data/data/com.google.android.gsf
it worked fine, stoped @ 23 of august.
see answers on service_not_available gcm. there can many reasons same. 1 of them either device can't read response or there 500/503 server. apparently there bug report also, hasn't been resolved yet. see details in link above.
Comments
Post a Comment