# PushManager

public class PushManager

用来进行推送初始化配置的主要管理类

## Properties

configId
Link copied to clipboard
public long configId
用于区分本次推送配置的特有 id ，取当前配置开始的时间戳作为值
pushConfig
Link copied to clipboard
public PushConfig pushConfig
serverPushType
Link copied to clipboard
public PushType serverPushType

## Functions

getConfigId
Link copied to clipboard
public long getConfigId()
getInstance
Link copied to clipboard
public static PushManager getInstance()
getPushConfig
Link copied to clipboard
public PushConfig getPushConfig()
getServerPushType
Link copied to clipboard
public PushType getServerPushType()
init
Link copied to clipboard
public void init(Context context, PushConfig pushConfig)
onErrorResponse
Link copied to clipboard
public void onErrorResponse(Context context, PushType pushType, String action, long resultCode)
向第三方平台请求 token 时失败事件处理
onNetworkChangeEvent
Link copied to clipboard
public void onNetworkChangeEvent(Context context)
网络变化重新配置事件
onNotificationMessageArrived
Link copied to clipboard
public void onNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage pushNotificationMessage)
推送通知到达的事件回调.
onNotificationMessageClicked
Link copied to clipboard
public void onNotificationMessageClicked(Context context, Intent pushIntent, PushType pushType, PushNotificationMessage pushNotificationMessage)
推送通知被点击时回调 融云自建通道的推送点击事件不会触发到这里，因为需要跨进程通信， 直接通过广播接收器进行接受处理
onPushRawData
Link copied to clipboard
public void onPushRawData(Context context, PushType pushType, String data)
收到透传的消息数据
onReceiveToken
Link copied to clipboard
public void onReceiveToken(Context context, PushType pushType, String token)
public void onReceiveToken(Context context, PushType pushType, String token, String area)
接受到第三方推送平台返回的 token 信息。
public void onReceiveToken(Context context, PushType pushType, String token, String area, boolean internal)
onSuccessResponse
Link copied to clipboard
public void onSuccessResponse(Context context, PushType pushType, List<TokenBean> tokenList, Map<String, String> failMap)
配置成功的处理
registerRong
Link copied to clipboard
public void registerRong(Context context, PushType pushType)
根据推送类型调用对应平台的注册接口进行注册.
updatePushServerInfoFromToken
Link copied to clipboard
public void updatePushServerInfoFromToken(String token)