package com.cooleshow.teacher.push;

import android.content.Context;

import com.cooleshow.base.utils.LogUtils;
import com.xiaomi.mipush.sdk.MiPushCommandMessage;
import com.xiaomi.mipush.sdk.MiPushMessage;

import cn.jpush.android.service.PluginXiaomiPlatformsReceiver;
import io.rong.push.platform.mi.MiMessageReceiver;

/**
 * Author by pq, Date on 2022/7/18.
 */
public class CustomMiMessageReceiver extends MiMessageReceiver {
    final PluginXiaomiPlatformsReceiver jpushService = new PluginXiaomiPlatformsReceiver();

    @Override
    public void onNotificationMessageArrived(Context context, MiPushMessage message) {
        super.onNotificationMessageArrived(context, message);
        jpushService.onNotificationMessageArrived(context, message);
    }

    @Override
    public void onNotificationMessageClicked(Context context, MiPushMessage message) {
        super.onNotificationMessageClicked(context, message);
        LogUtils.i("pq","onNotificationMessageClicked:"+message.getContent());
        jpushService.onNotificationMessageClicked(context, message);
    }

    @Override
    public void onReceiveRegisterResult(Context context, MiPushCommandMessage message) {
        super.onReceiveRegisterResult(context, message);
        jpushService.onReceiveRegisterResult(context, message);
    }

    @Override
    public void onReceivePassThroughMessage(Context context, MiPushMessage message) {
        super.onReceivePassThroughMessage(context, message);
        jpushService.onReceivePassThroughMessage(context, message);
    }

    @Override
    public void onCommandResult(Context context, MiPushCommandMessage message) {
        super.onCommandResult(context, message);
        jpushService.onCommandResult(context, message);
    }
}
