创建通知
为了创建在手机与可穿戴设备中都能展现的通知,可以使用 NotificationCompat.Builder。通过该类创建的通知,系统会处理该通知是否展现在手机或者穿戴设备中。
导入必要的类库
在开发之前首先需要导入以下类库
importandroid.support.v4.app.NotificationCompat;
importandroid.support.v4.a...
分类:
移动开发 时间:
2014-07-29 13:15:27
阅读次数:
335
在发送一个Notification前,我们需要准备好一个NotificationManagerNotificationManager manager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE)...
分类:
其他好文 时间:
2014-07-28 21:25:24
阅读次数:
165
uvm_transaction继承自uvm_object,添加了timing和recording接口,该类是uvm_sequence_item的基类。下边将做剖析1.这个类提供了时间戳属性(timestamp properties),通知事件(notification events),和交易记录(t...
分类:
其他好文 时间:
2014-07-27 23:16:10
阅读次数:
558
(注:下面所指的低版本是指2.3及2.3以下版本)1.如何取消掉通知栏上的通知 (1)设置对应的flags,让用户点击既被消除:notification.flags = FLAG_AUTO_CANCEL; (2) 通过手动消除某项或则全部通知mNotificationMgr.cancle(NOTI....
分类:
其他好文 时间:
2014-07-27 22:33:59
阅读次数:
224
JPush纠结了5-6个小时,一直报下面的错误,纠结![AndroidUtil] AndroidManifest.xml missing required intent filter for PushReceiver: cn.jpush.android.intent.NOTIFICATION_REC...
分类:
移动开发 时间:
2014-07-26 14:16:04
阅读次数:
517
Notification可以在手机的状态栏发出一则通知,它需要用NotificationManager来管理,实现Notification其实很简单。1.通过getsystemservice方法获得一个Notificationmanager对象NotificationManager notifica...
分类:
移动开发 时间:
2014-07-26 00:07:46
阅读次数:
325
实现了以下iOS页面间传值:1.委托delegate方式;2.通知notification方式;3.block方式;4.UserDefault或者文件方式;5.单例模式方式;6.通过设置属性,实现页面间传值在iOS开发中,我们经常会遇到页面间跳转传值的问题,现归纳总结一下:情况1:A页面跳转到B页面...
分类:
移动开发 时间:
2014-07-26 00:06:56
阅读次数:
322
iOS页面间传值的方式(NSUserDefault/Delegate/NSNotification/Block/单例)实现了以下iOS页面间传值:1.委托delegate方式;2.通知notification方式;3.block方式;4.UserDefault或者文件方式;5.单例模式方式;6.通过...
分类:
移动开发 时间:
2014-07-25 14:06:01
阅读次数:
284
本文介绍AndroidPn项目实现推送的使用过程。 在上一篇文章中提到在Android中实现推送方式的解决方案,其中一个比较成熟的解决方案便是使用XMPP协议实现。而AndroidPn项目就是使用XMPP协议实现信息推送的一个开源项目。在这里给大家介绍其使用过程。 Apndroid Push N.....
分类:
移动开发 时间:
2014-07-24 21:54:22
阅读次数:
311
昨天一天只写了两篇文章,效率超低。追其原因呢,其实我一直在研究notification的实现方式,今天研究完了给大家分享一下。本来想写个工具类来封装一下代码的,但是我发现notification的个性化元素太多了,做成一个方法的话参数又多的要死...
分类:
其他好文 时间:
2014-07-23 15:17:07
阅读次数:
369