Java Code Examples for com.xiaomi.mipush.sdk.MiPushClient#unregisterPush()

The following examples show how to use com.xiaomi.mipush.sdk.MiPushClient#unregisterPush() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PushManager.java    From smart-farmer-android with Apache License 2.0 6 votes vote down vote up
public static void unregister(Context context) {
    if (context == null)
        return;
    if (RomUtil.rom() == PhoneTarget.EMUI) {
        HWReceiver.clearPushListener();
        com.huawei.android.pushagent.api.PushManager.deregisterToken(context, getToken(context).getToken());
        return;

    }
    if (RomUtil.rom() == PhoneTarget.MIUI) {
        MiMessageReceiver.clearPushListener();
        MiPushClient.unregisterPush(context);
        return;
    }

    if (RomUtil.rom() == PhoneTarget.JPUSH) {
        JPushReceiver.clearPushListener();
        JPushInterface.stopPush(context);
        return;
    }
}
 
Example 2
Source File: ThirdPushManager.java    From imsdk-android with MIT License 5 votes vote down vote up
@Override
public void unRegisterPush(Context context) {
    Logger.i("注销Third推送 unRegisterPush  appId : " + appId + "  appKey : " + appKey + "  regid : " + MiPushClient.getRegId(context));
    unsetAlias(context, null);
    MiPushClient.unregisterPush(context.getApplicationContext());
    HttpUtil.unregistPushinfo(PhoneInfoUtils.getUniqueID(), QTPushConfiguration.getPlatName(), true);
}
 
Example 3
Source File: MiPushManager.java    From imsdk-android with MIT License 5 votes vote down vote up
@Override
public void unRegisterPush(Context context) {
    Logger.i("注销小米推送 unRegisterPush  appId : " + appId + "  appKey : " + appKey + "  regid : " + MiPushClient.getRegId(context));
    unsetAlias(context, null);
    MiPushClient.unregisterPush(context.getApplicationContext());
    HttpUtil.unregistPushinfo(PhoneInfoUtils.getUniqueID(), QTPushConfiguration.getPlatName(), true);
}
 
Example 4
Source File: MiPushProvider.java    From MixPush with Apache License 2.0 4 votes vote down vote up
@Override
public void unRegister(Context context) {
    MiPushClient.unregisterPush(context.getApplicationContext());
}
 
Example 5
Source File: NotificationUtil.java    From talk-android with MIT License 4 votes vote down vote up
public static void stopPush(Context context) {
    if (USE_XIAOMI) {
        MiPushClient.unregisterPush(context);
    }
}
 
Example 6
Source File: MiuiPushManager.java    From AndroidPush with Apache License 2.0 4 votes vote down vote up
@Override
public void unregister(Context context) {
    MiuiReceiver.clearPushInterface();
    MiPushClient.unregisterPush(context);
}