1package com.netease.nimlib.sdk.mixpush;
3import android.app.Service;
4import android.content.Context;
5import android.content.Intent;
6import android.os.IBinder;
7import androidx.annotation.Nullable;
8import com.hihonor.push.sdk.HonorPushDataMsg;
9import com.netease.nimlib.log.NimLog;
10import com.netease.nimlib.mixpush.model.PushType;
11import com.netease.nimlib.mixpush.platforms.MixPushPlatforms;
19 private static final String TAG =
"HonorPushMessageService";
20 public static final String
ACTION =
"com.netease.nimlib.mixpush.honor.action.MESSAGING_EVENT";
23 NimLog.mixPush(TAG +
" onCreate");
28 public IBinder
onBind(Intent intent) {
33 NimLog.mixPush(TAG +
" onNewToken, token=" + token);
34 MixPushPlatforms.getPushPlatform(PushType.HONOR).onToken(token);
43 NimLog.mixPush(TAG +
" onMessageReceived");
以下这些方法运行在非 UI 线程中, 与荣耀的HonorMessageService 方法一一对应。 当开发者自身也接入荣耀推送,则应将继承 HonorMessageService 改为继承 Honor...
IBinder onBind(Intent intent)
void onNewToken(String token)
static final String ACTION
void onCreate(Context context)
void onMessageReceived(HonorPushDataMsg msg)
透传消息, 需要用户自己弹出通知