Android GCM通知不存在';不会出现在通知栏中。安卓

Android GCM通知不存在';不会出现在通知栏中。安卓,android,google-cloud-messaging,Android,Google Cloud Messaging,我已经在我的手机和eclipse emulator(针对GoogleAPI级别16)上测试了我的应用程序,但即将发布的通知只会显示在真实手机的通知栏中,而不会显示在emulator中。你知道这是怎么回事吗?当你在emulator上工作时,你能检查一下你是否能得到一个regID GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); final String regId = GCMRegistrar.getRegistr

我已经在我的手机和eclipse emulator(针对GoogleAPI级别16)上测试了我的应用程序,但即将发布的通知只会显示在真实手机的通知栏中,而不会显示在emulator中。你知道这是怎么回事吗?

当你在emulator上工作时,你能检查一下你是否能得到一个
regID

GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);

final String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
  GCMRegistrar.register(this, SENDER_ID);
} else {
  Log.v(TAG, "Already registered");
}

与真实设备regID相同吗?相同吗?它不应该是sameYes,它应该是不同的,并且在您的服务器站点上,您必须保存这些regID。我的意思是您是否发送推送通知emulator regID或设备regID?设备注册后,我将regID存储到我的服务器。一旦生成新的消息,它将被发送到所有设备