android - In GCM, what is the error id in onError (Context context, String errorId) -


in gcm example android, example gcmintentservice suggests overriding following method:

onerror(context context, string errorid): called when device tries register or unregister, gcm returned error. typically, there nothing done other evaluating error (returned errorid) , trying fix problem.

my question is, error id come from? how determine if error occurred on registration vs unregistering example?

the gcmbaseintentservice wasn't of either, specifying errorid - error id returned gcm service.

here error codes specified google :

if application request (be register or unregister) fails, error set error code, , other extras not set. here possible error codes:

service_not_available

the device can't read response, or there 500/503 server can retried later. android application should use exponential back-off , retry. see advanced topics more information.

account_missing

there no google account on phone. android application should ask user open account manager , add google account. fix on device side.

authentication_failed

bad google account password. android application should ask user enter his/her google account password, , let user retry manually later. fix on device side.

invalid_sender

the sender account not recognized. must fixed on android application side. developer must fix application provide right sender in com.google.android.c2dm.intent.register intent.

phone_registration_error

incorrect phone registration google. phone doesn't support gcm.

invalid_parameters

the request sent phone not contain expected parameters. phone doesn't support gcm.

(quote taken here)


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -