# SetPushMsgCallback
用于注册 callback 以获得推送消息内容
# 调用参数
无
# 返回参数
属性 | 说明 |
---|---|
msgBody | 推送消息的内容 |
# 示例代码
val request = WMPFPushMsgRequest()
request.baseRequest = WMPFBaseRequestHelper.checked()
val result = WMPFIPCInvoker.invokeAsync<IPCInovkerTask_SetPushMsgCallback,
WMPFPushMsgRequest, WMPFPushMsgResponse>(
request,
IPCInovkerTask_SetPushMsgCallback::class.java
) { response ->
ui.printlnToView("receive: " + resp.msgBody)
}
if (!result) {
it.onError(Exception("invoke listeningPushMsg fail"))
}