private PendingIntent mPendingIntent;
String msg_Ticker;
public void onPush(String msgtype,String carcount){
String msg_Ticker ="";
if(msgtype.equals(“A”)){
msg_Ticker = “您车队所属车辆中有”+carcount+“辆车保险即将到期,请注意及时续保。”;
}else if(msgtype.equals(“B”)){
msg_Ticker = “您车队所属车辆中有需要待确认是否理赔的案件信息,请及时操作”;
}
if(mNotificationManager == null){
mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
}
mPendingIntent = null;
Intent notificationIntent= new Intent(mContext,Register.class);
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
notificationIntent.putExtra("data", "哈哈");
mPendingIntent = PendingIntent.getActivity(mContext, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
String id = "my_channel_01";
String name="我是";
Notification