Android--Service之Notification
来源:互联网 发布:医美网络咨询师好做吗 编辑:程序博客网 时间:2024/06/06 00:36
启动
Notification.Builder builder=new Builder(MainActivity.this);builder.setContentTitle("Test").setContentText("This is test!").setSmallIcon(R.drawable.ic_launcher);PendingIntent pi=PendingIntent.getActivity(getApplicationContext(), 1, new Intent(getApplicationContext(), TestMainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);builder.setContentIntent(pi);builder.setDeleteIntent(pi);NotificationManager n=(NotificationManager) getSystemService(NOTIFICATION_SERVICE);n.notify(1, builder.getNotification());
关闭
NotificationManager n=(NotificationManager) getSystemService(NOTIFICATION_SERVICE);n.cancel(1);
0 0
- Android--Service之Notification
- android service broadcast notification
- 68 Android service Notification
- Android-Service&Notification
- android Service显示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通知
- CustomView
- android照相机简单实例
- hdu 2795 线段树,区间更新求补值
- 基于C#的socket编程的TCP异步实现
- 在字符串中找出连续最长的数字串
- Android--Service之Notification
- 初窥LuaJit中 --- 试用FFI
- Memcached与Redis
- 习题3-6
- p122 16
- SQL语法大全
- Vmware10安装mac os x 10.9
- Javascript_Note.4
- hibernate中主键生成机制hi/lo算法说明