NIMSDK-AOS  9.16.0
Public 成员函数 | 所有成员列表
com.netease.nimlib.sdk.mixpush.MixPushService接口 参考

第三方推送服务 目前接入的第三方推送有:小米、华为、魅族、fcm。 更多...

Public 成员函数

InvocationFuture< Void > enable (boolean enable)
 开启/关闭第三方推送服务 更多...
 
boolean isEnable ()
 是否开启了第三方推送服务 更多...
 
InvocationFuture< Void > setPushNoDisturbConfig (boolean isOpen, String startTime, String stopTime)
 设置推送免打扰时间,时间参数为北京时间的24小时计数 HH:mm,该时间段将不再向用户推送消息 SDK 3.2.0 版本以前的用户,为了将用户设置的免打扰配置与push免打扰同步,应该在监听到登陆同步完成后, 调用 setPushNoDisturbConfig 方法。如果开发者不使用新版第三方推送功能,只要不调用该方法,则旧的功能不受影响。 此外,在免打扰设置界面也应该做到同时设置push免打扰 更多...
 
InvocationFuture< Void > setPushShowNoDetail (boolean showNoDetail)
 设置推送是否不展示详情 更多...
 
boolean isPushShowNoDetail ()
 获取推送是否不展示详情 更多...
 
NoDisturbConfig getPushNoDisturbConfig ()
 获取推送免打扰设置 更多...
 
boolean isPushNoDisturbConfigExist ()
 SDK 是否存在推送消息提醒的免打扰。 更多...
 
boolean isFCMIntent (Intent intent)
 Activity是否是由点击 fcm 通知启动 更多...
 
String parseFCMPayload (Intent intent)
 从 FCM 中解出 payload 字符串 更多...
 
InvocationFuture< Void > registerPush (boolean fcmPreferred)
 注册推送 更多...
 

详细描述

第三方推送服务 目前接入的第三方推送有:小米、华为、魅族、fcm。

在文件 MixPushService.java15 行定义.

成员函数说明

◆ enable()

InvocationFuture<Void> com.netease.nimlib.sdk.mixpush.MixPushService.enable ( boolean  enable)

开启/关闭第三方推送服务

参数
enabletrue 开启,SDK 需要与云信服务器做确认;false 关闭,SDK 也需要通知云信服务器。
返回
InvocationFuture 可以设置回调函数。只有与服务器交互完成后才算成功,如果出错,会有具体的错误代码。

◆ getPushNoDisturbConfig()

NoDisturbConfig com.netease.nimlib.sdk.mixpush.MixPushService.getPushNoDisturbConfig ( )

获取推送免打扰设置

返回
NoDisturbConfig

◆ isEnable()

boolean com.netease.nimlib.sdk.mixpush.MixPushService.isEnable ( )

是否开启了第三方推送服务

返回
默认开启

◆ isFCMIntent()

boolean com.netease.nimlib.sdk.mixpush.MixPushService.isFCMIntent ( Intent  intent)

Activity是否是由点击 fcm 通知启动

参数
intentactivity intent
返回
判断结果

◆ isPushNoDisturbConfigExist()

boolean com.netease.nimlib.sdk.mixpush.MixPushService.isPushNoDisturbConfigExist ( )

SDK 是否存在推送消息提醒的免打扰。

返回
SDK 是否存在推送消息提醒的免打扰。

◆ isPushShowNoDetail()

boolean com.netease.nimlib.sdk.mixpush.MixPushService.isPushShowNoDetail ( )

获取推送是否不展示详情

返回
当前是否不展示详情

◆ parseFCMPayload()

String com.netease.nimlib.sdk.mixpush.MixPushService.parseFCMPayload ( Intent  intent)

从 FCM 中解出 payload 字符串

参数
intentactivity intent
返回

◆ registerPush()

InvocationFuture<Void> com.netease.nimlib.sdk.mixpush.MixPushService.registerPush ( boolean  fcmPreferred)

注册推送

◆ setPushNoDisturbConfig()

InvocationFuture<Void> com.netease.nimlib.sdk.mixpush.MixPushService.setPushNoDisturbConfig ( boolean  isOpen,
String  startTime,
String  stopTime 
)

设置推送免打扰时间,时间参数为北京时间的24小时计数 HH:mm,该时间段将不再向用户推送消息 SDK 3.2.0 版本以前的用户,为了将用户设置的免打扰配置与push免打扰同步,应该在监听到登陆同步完成后, 调用 setPushNoDisturbConfig 方法。如果开发者不使用新版第三方推送功能,只要不调用该方法,则旧的功能不受影响。 此外,在免打扰设置界面也应该做到同时设置push免打扰

参数
isOpen是否开启
startTime开始时间 格式 HH:mm
stopTime结束时间 格式 HH:mm
返回
InvocationFuture 可以设置回调函数。成功会返回成功信息,错误会返回相应的错误码。

◆ setPushShowNoDetail()

InvocationFuture<Void> com.netease.nimlib.sdk.mixpush.MixPushService.setPushShowNoDetail ( boolean  showNoDetail)

设置推送是否不展示详情

参数
showNoDetail是否不展示详情
返回
InvocationFuture 可以设置回调函数。成功会返回成功信息,错误会返回相应的错误码。

该接口的文档由以下文件生成: