Package io.rong.push
Interface PushEventListener
-
- All Implemented Interfaces:
public interface PushEventListener
-
-
Method Summary
Modifier and Type Method Description abstract boolean
preNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage)
通知显示之前的回调,用户可拦截此事件进行通知自定义显示。 融云默认推送、华为数据透传方式推送、 FCM 数据方式推送会回调此方法。 abstract void
afterNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage)
接收到第三方推送平台的推送到达事件时的回调。 此时通知已由手机平台弹出,无法自定义。 abstract boolean
onNotificationMessageClicked(Context context, PushType pushType, PushNotificationMessage notificationMessage)
通知点击时的回调。 abstract void
onThirdPartyPushState(PushType pushType, String action, long resultCode)
第三方推送设置状态回调 abstract void
onTokenReceived(PushType pushType, String token)
收到 推送 token 回调 abstract void
onTokenReportResult(PushType reportType, int code, PushType finalType, String finalToken)
token 上报回调 -
-
Method Detail
-
preNotificationMessageArrived
abstract boolean preNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage)
通知显示之前的回调,用户可拦截此事件进行通知自定义显示。 融云默认推送、华为数据透传方式推送、 FCM 数据方式推送会回调此方法。
- Parameters:
context
- 上下文pushType
- 推送类型notificationMessage
- 推送消息- Returns:
是否拦截处理。true 代表此事件被拦截,sdk 不再处理;false, 按 sdk 默认逻辑处理
-
afterNotificationMessageArrived
abstract void afterNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage)
接收到第三方推送平台的推送到达事件时的回调。 此时通知已由手机平台弹出,无法自定义。
- Parameters:
context
- 上下文pushType
- 推送类型notificationMessage
- 推送消息
-
onNotificationMessageClicked
abstract boolean onNotificationMessageClicked(Context context, PushType pushType, PushNotificationMessage notificationMessage)
通知点击时的回调。
- Parameters:
context
- 上下文pushType
- 推送类型notificationMessage
- 推送消息- Returns:
事件是否被拦截处理。true, 代表事件被应用层拦截, sdk 不再处理;false, 按 sdk 默认逻辑处理。
-
onThirdPartyPushState
abstract void onThirdPartyPushState(PushType pushType, String action, long resultCode)
第三方推送设置状态回调
- Parameters:
pushType
- 推送类型action
- 事件resultCode
- 错误码
-
onTokenReceived
abstract void onTokenReceived(PushType pushType, String token)
收到 推送 token 回调
- Parameters:
pushType
- 推送类型token
- 收到的 PushToken
-
onTokenReportResult
abstract void onTokenReportResult(PushType reportType, int code, PushType finalType, String finalToken)
token 上报回调
- Parameters:
reportType
- 上报类型code
- 服务器返回 codefinalType
- 最终的协商结果finalToken
- 最终协商的 token
-
-
-
-