GCM を使用してプッシュ通知を使用していますが、GCM から RegID を受信していません。
これが私のコードです
// Make sure the device has the proper dependencies.
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
registerReceiver(mHandleMessageReceiver, new IntentFilter(CommonUtilities.DISPLAY_MESSAGE_ACTION));
String str= GCMRegistrar.getRegistrationId(SelectLogin.this);
Const.GCM_RegId =str;
Log.print(" ------------First regId :::::"+Const.GCM_RegId);
// Check if regid already presents
if (Const.GCM_RegId.equals(""))
{
// Registration is not present, register now with GCM
GCMRegistrar.register(this, CommonUtilities.SENDER_ID);
}
else {
// Device is already registered on GCM
if (GCMRegistrar.isRegisteredOnServer(this)) {
}
else
{
if(WebInterface.isOnline(SelectLogin.this))
{
new RegisterGCM(SelectLogin.this, Const.GCM_RegId).execute();
}
}
}