Unregister C2DM registration Id

眉间皱痕 提交于 2019-12-06 14:28:02

问题


I want to un-register C2DM registration id. When I run the code below:

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

app should not get the message from third party server. But app is still getting messages from server. I have put all required permission in the manifest file.
Referred site : http://code.google.com/android/c2dm/

来源:https://stackoverflow.com/questions/8851589/unregister-c2dm-registration-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!