Log.i(LOGTAG,"GCM has a new token: instanceId="+instanceId.getId()+", token="+registrationToken);
}catch(Exceptione){
Log.e(LOGTAG,"FATAL: Failed to fetch a fresh new token, instanceId="+instanceId.getId(),e);
return;
}
notifyTokenEvent(registrationToken);
}
protectedStringgetSenderId(){
finalStringsenderId=getSenderIdFromManifest();
if(senderId==null){
thrownewIllegalStateException("Sender ID not found in manifest. Did you forget to add it as the value of a '"+GCM_SENDER_ID_ATTR_NAME+"' meta-data field?");
Log.i(LOGTAG,"GCM has a new token: instanceId="+instanceId.getId()+", token="+registrationToken);
returnregistrationToken;
}catch(Exceptione){
thrownewException("FATAL: Failed to fetch a fresh new token, instanceId="+instanceId.getId(),e);
}
}
protectedStringgetSenderId(){
finalStringsenderId=getSenderIdFromManifest();
if(senderId==null){
thrownewIllegalStateException("Sender ID not found in manifest. Did you forget to add it as the value of a '"+GCM_SENDER_ID_ATTR_NAME+"' meta-data field?");