package com.zhaoyang.driver.ui.push;
|
|
import android.content.Context;
|
import android.util.Log;
|
|
import com.zhaoyang.driver.base.MyApplication;
|
|
import cn.jpush.android.api.CustomMessage;
|
import cn.jpush.android.api.NotificationMessage;
|
import cn.jpush.android.service.JPushMessageReceiver;
|
|
public class JPushReceiver extends JPushMessageReceiver {
|
private static final String TAG = "JPushReceiver";
|
|
@Override
|
public void onConnected(Context context, boolean b) {
|
super.onConnected(context, b);
|
Log.i(TAG, "onConnected: ");
|
}
|
|
@Override
|
public void onMessage(Context context, CustomMessage customMessage) {
|
super.onMessage(context, customMessage);
|
Log.i(TAG, "onMessage: ");
|
}
|
|
|
@Override
|
public void onNotifyMessageOpened(Context context, NotificationMessage notificationMessage) {
|
super.onNotifyMessageOpened(context, notificationMessage);
|
Log.i(TAG, "onNotifyMessageOpened: ");
|
}
|
|
@Override
|
public void onNotifyMessageArrived(Context context, NotificationMessage notificationMessage) {
|
super.onNotifyMessageArrived(context, notificationMessage);
|
MyApplication.Companion.getTTsManager().setVideoText(notificationMessage.notificationContent);
|
}
|
}
|