Message{_id=120, messageId=0, createTimeInMillis=1594959196922, direct=send, status=send_fail, content=
**{"text":"。。。","extras":{}},** version=1, fromName='娃哈哈', contentType=text, contentTypesString='text',
targetType=single, targetID='null', targetName='null', fromType='user', atList=null, fromID=17612341234, notification=null,
isSetFromName=0, suiMTime=0, haveRead=0, unreceipt cnt=0, unreceipt mtime=0}
原因:极光添加extras 时 不会将相应的数据更新到数据库。
解决: 极光API文档手动调用该方法在添加时
public abstract boolean updateMessageExtra(Message msg,
java.lang.String key,
java.lang.Boolean value)
更新message中的extra 此接口会将相应的数据更新到数据库。
参数:
msg - 被更新的message对象
key - 待更新的key,不能为null
value - 待更新的value,不能为null
返回:
更新成功返回true, 其他情况返回false
最后
以上就是友好星月最近收集整理的关于Android 极光IM 发送消息附带Extras 时 自己发送的消息extras 显示为空的全部内容,更多相关Android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复