2011-12-14 94 views
1

如何从c2dm onclick按钮取消注册?我想添加到应用程序功能以停止用户注销时接收通知。如何从c2dm注销?

+0

http://code.google.com/intl/pl-PL/android/c2dm/#unregistering – Selvin 2011-12-14 10:46:54

回答

0

我建议你通知你的服务器停止发送推送消息给移动设备。

无需从C2DM服务器取消注册,因为Google已经对发送到服务器的消息有限制。所以,只要通知您的服务器停止发送消息。

2

从C2DM注销:

Intent unregIntent = new Intent("com.google.android.c2dm.intent.UNREGISTER"); 
unregIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0)); 
startService(unregIntent); 

http://code.google.com/android/c2dm/#unregistering