1 package com.netease.nimlib.sdk.mixpush;
3 import android.app.Service;
4 import android.content.Context;
5 import android.content.Intent;
6 import android.os.IBinder;
7 import androidx.annotation.Nullable;
8 import com.hihonor.push.sdk.HonorPushDataMsg;
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");
void onNewToken(String token)
static final String ACTION
以下这些方法运行在非 UI 线程中, 与荣耀的HonorMessageService 方法一一对应。 当开发者自身也接入荣耀推送...
IBinder onBind(Intent intent)
void onMessageReceived(HonorPushDataMsg msg)
透传消息, 需要用户自己弹出通知
void onCreate(Context context)