Google cloud messaging 如何强制GCMRegistar注销?

Google cloud messaging 如何强制GCMRegistar注销?,google-cloud-messaging,Google Cloud Messaging,我无法注销GCMRegistar。我试图通过以下方式运行我的代码: GCMRegistrar.unregister(getApplicationContext()); 而且 GCMRegistrar.setRegisteredOnServer(getApplicationContext(), false); 而且 Intent unregIntent = new Intent("com.google.android.c2dm.intent.UNREGISTER"); unregIntent.

我无法注销GCMRegistar。我试图通过以下方式运行我的代码:

GCMRegistrar.unregister(getApplicationContext());
而且

GCMRegistrar.setRegisteredOnServer(getApplicationContext(), false);
而且

Intent unregIntent = new Intent("com.google.android.c2dm.intent.UNREGISTER");
unregIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
startService(unregIntent);
即使我清除了我的应用程序的数据/缓存,并且此应用程序已被终止但未卸载,我也会收到通知。(我也登记了DDMS)

不幸的是,由于版权问题,我无法粘贴我的代码。
是否有人有相同的问题?

您的应用程序启动时是否重新注册?您还必须确保您正在从服务器注销。是的,服务器端可能有问题,但我没有访问权限,谢谢