public class Msg4Event extends Msg
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CLICK
自定义菜单点击事件
|
static String |
LOCATION
上报地理位置事件
|
static String |
SCAN
用户已关注时的事件推送
|
static String |
SUBSCRIBE
订阅
|
static String |
UNSUBSCRIBE
取消订阅
|
head, MSG_ERROR, MSG_TYPE_EVENT, MSG_TYPE_IMAGE, MSG_TYPE_IMAGE_TEXT, MSG_TYPE_LINK, MSG_TYPE_LOCATION, MSG_TYPE_MUSIC, MSG_TYPE_TEXT, MSG_TYPE_VIDEO, MSG_TYPE_VOICE| 限定符和类型 | 方法和说明 |
|---|---|
String |
getEvent()
获取Event
|
String |
getEventKey()
获取EventKey
|
String |
getLatitude() |
String |
getLongitude() |
String |
getPrecision() |
String |
getTicket() |
void |
read(Document document)
读取消息内容
|
void |
setEvent(String event)
设置Event
|
void |
setEventKey(String eventKey)
设置EventKey
|
void |
setLatitude(String latitude) |
void |
setLongitude(String longitude) |
void |
setPrecision(String precision) |
void |
setTicket(String ticket) |
void |
write(Document document)
因为此消息都是由微信服务器发送给我们的,我们不用发给微信服务器,因此不用实现write
|
getCreateTime, getElementContent, getFromUserName, getHead, getToUserName, setCreateTime, setFromUserName, setHead, setToUserNamepublic Msg4Event(Msg4Head head)
head - 消息头public void write(Document document)
public String getEvent()
public void setEvent(String event)
event - 事件public String getEventKey()
public void setEventKey(String eventKey)
eventKey - 事件keypublic String getTicket()
public void setTicket(String ticket)
ticket - the ticket to setpublic String getLatitude()
public void setLatitude(String latitude)
latitude - the latitude to setpublic String getLongitude()
public void setLongitude(String longitude)
longitude - the longitude to setpublic String getPrecision()
public void setPrecision(String precision)
precision - the precision to setCopyright © 2018. All rights reserved.