android Notification的使用
来源:互联网 发布:java 修改图片名字 编辑:程序博客网 时间:2024/06/15 13:29
NotificationManager nm=(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification;
notification=new Notification(R.drawable.music5,"正在播放 "+content,System.currentTimeMillis());
//创建一个启动其他activity的intent;
Intent nIntent=new Intent(context,MainActivity.class);
//PendingIntent这个类用于处理即将发生的事情。比如在通知Notification中用于跳转页面,但不是马上跳转。
PendingIntent pendingIntent=PendingIntent.getActivity(context, 0, nIntent, 0);
notification.setLatestEventInfo(context, title, content, pendingIntent);
nm.notify(0, notification);
0 0
- Android-Notification的使用
- Android Notification的使用
- android Notification 的使用
- android Notification 的使用
- Android Notification 的使用
- Android-Notification的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- android Notification的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- android Notification 的使用
- 数据库连接池
- 求助!跪求win8.1能使用的转串口驱动!谢谢大神。
- 设计模式-抽象工厂模式
- 云计算统一办公运营平台服务能力设计方案
- 前端工程师不能依赖外部条件针对网站
- android Notification的使用
- python核心编程六——条件和循环
- RabbitMQ学习之工作队列(java)
- CI框架源码阅读笔记5 基准测试 BenchMark.php
- 鸟哥Linux私房菜知识点总结6到7章
- SharePoint 2013 Designer 自定义操作菜单
- Linux系统下如何查看CPU个数
- 安卓智能聊天机器人开发(一)
- RabbitMQ学习之发布/订阅(java)