PushManager

public class PushManager

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

Properties

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

Functions

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