2013年10月16日

AlarmManager的使用

摘要: AlarmManager 闹钟管理器 设置各种定时器,到设定的时间给我们广播一个我们自己设定的Intent。 阅读全文

posted @ 2013-10-16 13:32 lancyWang 阅读(402) 评论(0) 推荐(0) 编辑

PendingIntent

摘要: PendingIntent可以说是 Intent的进一步封装,他既包含了Intent的描述又是Intent行为的执行(这种定义也许不太严格),如果将Intent比作成一个订单的 话,PendingIntent更像是一个下订单的人,因为它既要负责将订单发出去,也要负责订单发送后的处理,比如发送成功后要准备验收订单货物,发送 失败后要重发还是取消订单等操作。开发者可以通过调用getActivity(Context, int, Intent, int) getBroadcast(Context, int, Intent, int) getService(Context, int, Intent, int) 三种不同方式来得到一个PendingIntent实例。 阅读全文

posted @ 2013-10-16 13:31 lancyWang 阅读(182) 评论(0) 推荐(0) 编辑

导航