[TOC]

跳过导航链接

cn.jpush.im.android.api.event

类 CommandNotificationEvent

  • java.lang.Object
    • cn.jpush.im.android.api.event.CommandNotificationEvent

public class CommandNotificationEvent
extends java.lang.Object

命令透传事件。当收到对方发送透传消息过来时,sdk会抛出此事件通知上层。 详见官方文档事件处理 一节

嵌套类概要

嵌套类 限定符和类型 类和说明 static class CommandNotificationEvent.GetTargetInfoCallback static class CommandNotificationEvent.Type

构造器概要

构造器 构造器和说明 CommandNotificationEvent(long senderUID, long targetID, CommandNotificationEvent.Type type, java.lang.String cmd)

方法概要

所有方法 实例方法;) 具体方法;) 限定符和类型 方法和说明 java.lang.String getMsg() 获取命令透传事件的msg void getSenderUserInfo(GetUserInfoCallback callback) 获取命令透传事件发送方的用户信息 void getTargetInfo(CommandNotificationEvent.GetTargetInfoCallback callback) 获取命令透传事件的targetInfo. CommandNotificationEvent.Type getType() 获取命令透传事件的target type

-    

从类继承的方法 java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

构造器详细资料

-  

CommandNotificationEvent

public CommandNotificationEvent(long senderUID,
                                long targetID,
                                CommandNotificationEvent.Type type,
                                java.lang.String cmd)

方法详细资料

-  

getSenderUserInfo

public void getSenderUserInfo(GetUserInfoCallback callback)

获取命令透传事件发送方的用户信息

  - 参数: 
  - <code>callback</code> - 结果回调        
-  

getTargetInfo

public void getTargetInfo(CommandNotificationEvent.GetTargetInfoCallback callback)

获取命令透传事件的targetInfo. 对于单聊或者群聊透传命令,这里callback中的targetInfo会返回命令发送对象的UserInfo或者GroupInfo。 对于自己登陆设备间的命令透传,callback中的targetInfo返回null.

  - 参数: 
  - <code>callback</code> - 结果回调        
-  

getType

public CommandNotificationEvent.Type getType()

获取命令透传事件的target type

  - 返回: 
  - 返回enum [<code>CommandNotificationEvent.Type</code>](../../../../../../cn/jpush/im/android/api/event/CommandNotificationEvent.Type.html)        
-  

getMsg

public java.lang.String getMsg()

获取命令透传事件的msg

  - 返回:       

跳过导航链接