Android 通知栏Notification点击跳转无效
来源:互联网 发布:c语言编写界面 编辑:程序博客网 时间:2024/06/06 07:11
一定要保证
修改后--->正确的方然:
notificationManager.notify(0,builder.build());
这段代码写在setContentIntent()方法之后否者无效.
之前点击无效的代码是这样写的---->错误的方法:
notificationManager.notify(0,builder.build());//点击通知栏跳转到聊天界面 Intent intent = new Intent(this,ChatActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); builder.setContentIntent(pendingIntent);
修改后--->正确的方然:
//点击通知栏跳转到聊天界面 Intent intent = new Intent(this,ChatActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); builder.setContentIntent(pendingIntent);notificationManager.notify(0,builder.build());
0 2
- Android 通知栏Notification点击跳转无效
- Notification通知点击无效,无法跳转问题
- Notification(Notification的通知栏常驻、Notification的各种样式、Notification点击无效)
- Notification通知,点击通知后跳转
- Android 点击通知栏 跳转
- Android 弹无虚发之第四弹:你应该掌握的Notification(Notification的通知栏常驻、Notification的各种样式、Notification点击无效)
- Android 弹无虚发之第四弹:你应该掌握的Notification(Notification的通知栏常驻、Notification的各种样式、Notification点击无效)
- Android 弹无虚发之第四弹:你应该掌握的Notification(Notification的通知栏常驻、Notification的各种样式、Notification点击无效)
- Android 弹无虚发之第四弹:你应该掌握的Notification(Notification的通知栏常驻、Notification的各种样式、Notification点击无效)
- 通知的点击跳转(Notification)
- android-Notification点击跳转Activity
- Android 点击通知栏跳转到应用程序
- android 使用Notification弹多个通知时,点击跳转intent取值时总是最后一个
- Android -- Notification,如何向通知栏发送通知,点击通知开启相应的Activity
- Android 通知栏 Notification
- Android---Notification通知栏
- Android 通知栏Notification
- Android 通知栏Notification
- HashMap源码阅读与解析
- Sublime Text 有意思的快捷键介绍
- 搭建RAC时配置scanip的DNS环境
- EhCache 是一个纯Java的进程内缓存框架
- 2.10.1_带有圆角的箭头图案
- Android 通知栏Notification点击跳转无效
- 新建Podfile文件时,使用vim新建
- arp命令--arping
- 汇编堆栈平衡的几种方式
- predicates 案例
- Java 多线程编程概要
- 学习大数据过程中遇到的问题1
- 2.10.1_二次方贝赛尔曲线
- java中常用类