百度推送,使用了百度的开发文档的Demo,在FrontiaPushMessageReceiver的类中的
onNotificationClicked的方法中含有三个参数,只能得到前两个,而后一个始终为null,
但是在后台推送的消息中包含了三个参数,是什么原因导致第三个参数为空?
安卓百度推送点击问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答
- WorldMobile 2015-05-29 05:23关注
参考一下这个例子
接收推送
功能描述
接收推送消息和通知,以及接口start、stop、setTags、deleteTags和listTags的返回值,开发者要实现一个FrontiaPushMessageReceiver的子类,并在AndroidManifest.xml中声明它。
类
FrontiaPushMessageReceiver
回调介绍
onBind:FrontiaPush.start绑定云推送的回调
onUnbind:FrontiaPush.stop断开与云推送的绑定的回调
onSetTags:FrontiaPush.setTags的回调
onDelTags:FrontiaPush.deleteTags的回调
onListTags:FrontiaPush.listTags的回调
onMessage:接收推送消息的回调
onNotificationClicked:接收推送通知的回调开发示例
package com.company;//子类的实现
public class MyPushMessageReceiver extends FrontiaPushMessageReceiver {//FrontiaPush.start() 的回调函数
public void onBind(Context context, Intent intent, String content, int errorCode, String appid, String userId,
String channelId, String requestId){
}//FrontiaPush.stop() 的回调函数
public void onUnbind(Context context, Intent intent, String content, int errorCode, String requestId){
}//FrontiaPush.setTags() 的回调函数
public void onSetTags(Context context, Intent intent, String content, int errorCode, List successTags,
List failTags, String requestId){
}//FrontiaPush.deleteTags() 的回调函数
public void onDelTags(Context context, Intent intent, String content,
int errorCode, List successTags, List failTags, String requestId){
}//FrontiaPush.listTags() 的回调函数
public void onListTags(Context context, Intent intent, String content,
int errorCode, List tags, String requestId){
}//接收推送消息的回调函数
public void onMessage(Context context, Intent intent, String message, String customContentString){
}//接收推送通知的回调函数
public void onNotificationClicked(Context context, Intent intent,
String title, String description, String customContentString){
}
}解决 无用评论 打赏 举报
悬赏问题
- ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
- ¥20 有关区间dp的问题求解
- ¥15 多电路系统共用电源的串扰问题
- ¥15 slam rangenet++配置
- ¥15 有没有研究水声通信方面的帮我改俩matlab代码
- ¥15 对于相关问题的求解与代码
- ¥15 ubuntu子系统密码忘记
- ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
- ¥15 保护模式-系统加载-段寄存器
- ¥15 电脑桌面设定一个区域禁止鼠标操作