notifications - how to get regID using pushwoosh android native SDK -


i using pushwoosh android native sdk push notifications. want reuse regid provided gcm on successful registration. how can regid using android native sdk ?

when regid gcm registration, store in sharedpreferences access later.

to store it

googlecloudmessaging gcm = googlecloudmessaging.getinstance(getapplicationcontext()); string regid = gcm.register(id); sharedpreferences shp = getapplicationcontext().getsharedpreferences("prefkey",         getapplicationcontext().mode_private); shp.edit().putstring("regid",regid).commit(); 

to it

sharedpreferences shp = getapplicationcontext().getsharedpreferences("prefkey",         getapplicationcontext().mode_private); if (shp != null && shp.contains("regid"))     regid = shp.getstring("regid", null); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -