26通知使用
来源:互联网 发布:淘宝付款打不开怎么办 编辑:程序博客网 时间:2024/05/22 17:26
1、Notification通知
private void showNotification() {
NotificationManager manager = (NotificationManager) this
.getSystemService(NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.ic_launcher,
"我爱你", System.currentTimeMillis());
PendingIntent intent = PendingIntent.getActivity(this, 0, new Intent(
this, DialogTestActivity.class), 0);
notification.setLatestEventInfo(this, "我说的", "你爱我", intent);
//notification.defaults = Notification.DEFAULT_ALL;//震动加声音
manager.notify(520, notification);
//manager.cancel(520);//清除通知
}
0 0
- 26通知使用
- 使用通知
- Swift - 使用NSNotificationCenter发送通知,接收通知
- 使用NSNotificationCenter 事件通知
- android通知的使用
- 使用NSNotificationCenter 事件通知
- Android 通知的使用
- 通知的简单使用
- 使用 MVVMLight 消息通知
- 通知机制的使用
- 通知的使用
- 本地通知的使用
- 使用NSNotificationCenter 事件通知
- 使用NSNotificationCenter 事件通知
- 通知中心的使用
- 通知的使用
- IOS通知的使用
- ios 通知的使用
- IOS学习笔记(十二)之IOS开发之表视图(UITableView)的讲解与使用(二)
- error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 27应用调用
- The Seventh Hunan Collegiate Programming Contest 盒子游戏
- 使用百度地图api实现定位功能。
- 26通知使用
- NYOJ-房间安排
- numpy 保存读取数据
- UIView UILabel UITextField UIButton
- 25游戏画图
- 自己实现C语言单向链表
- 二叉树迭代版的三种遍历
- 24窗口控制
- magento后台 Fatal error: Call to a member function getId() on a non-object in错误