android 中通知消息中打开activity带参数的问题
来源:互联网 发布:网络安全法展板 编辑:程序博客网 时间:2024/05/20 08:24
在activity中获取的参数始终是空的,一开始在PenddingIntent的最后一个参数用0
Intent intent=new Intent(getApplicationContext(),Main2Activity.class);Log.d("notice",drugname);intent.putExtra("drug",drugname);PendingIntent pendingIntent= PendingIntent.getActivity(getApplicationContext(),0,intent,0);
导致无法正确获取参数
PendingIntent pendingIntent= PendingIntent.getActivity(getApplicationContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);修改了第四个参数后能够正确获取
阅读全文
0 0
- android 中通知消息中打开activity带参数的问题
- 【Android开发那点破事】消息推送BroadcastReceiver,点击通知打开两次Activity问题
- 收到消息通知的时候 打开Activity的处理
- js中利用window.open()打开带参数的链接问题
- Android中当用户关闭通知消息权限后Toast显示不出的问题
- Android中自带的对话框及通知栏
- Android中Activity的LunchMode参数详解
- Android中桌面图标显示通知消息的数量
- android中使用EventBus进行消息通知
- Android中Activity返回参数
- iOS中使用通知传递参数问题
- 不在activity中打开activity的方法
- android-带进度条的系统通知栏消息
- android-带进度条的系统通知栏消息
- -------------------------android-带进度条的系统通知栏消息
- Android 消息通知栏返回正在运行的Activity
- Android中打开新的Activity的三种方法
- Android中打开新的Activity的三种方法
- 移植tslib和Qt5.6到三星s5pv210开发板
- vector 的注意事项 (poj2195 小人进房子 最小费用最大流)
- hdu 1142 A Walk Through the Forest
- 判断两个对象相等 和重写equals、 hashcode
- 比较两对象为什么要重写hashCode()方法
- android 中通知消息中打开activity带参数的问题
- linux环境下为php7装phpredis扩展
- AI challenger 场景分类 tensorflow inception-resnet-v2 LB: 0.94361
- Redis在Centos7上的安装部署
- Centos7下安装php-redis扩展及简单使用
- Centos7下关于memcached的安装和简单使用
- PHP中利用PHPMailer配合QQ邮箱实现发邮件
- Centos7下配置Redis开机自启动
- 搭建服务器上的GIT并实现自动同步到站点目录(www)