事件循环NSRunLoop 1、run loop概念 NSRunLoop类封装了线程进入事件循环的过程,一个runloop实例就表示了一个线程的事件循环。 处于事件循环的线程接收的事件源有两种:input source 和 timer source。线程调用便利函数 [NSTimer schedul ...
分类:
移动开发 时间:
2016-04-03 00:16:16
阅读次数:
278
//1、获得通知管理者 NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); //2、创建Intent 对象Intent intent = new Intent(this,Othe ...
分类:
其他好文 时间:
2016-04-02 21:37:38
阅读次数:
171
需要默认屏蔽特定app的通知提示
设置app是否接收通知的界面
点击每个条目进去的界面
AppNotificationSettings extends SettingsPreferenceFragment
private SwitchPreference mBlock; //条目通过Preference设置
mBlock.setChecked(mAppRow.banned);mBlock....
分类:
其他好文 时间:
2016-04-01 18:47:55
阅读次数:
327
pendingIntent字面意义:等待的,未决定的Intent。
要得到一个pendingIntent对象,使用方法类的静态方法 getActivity(Context,
int, Intent, int),getBroadcast(Context,
int, Intent, int),getService(Context,
int, Intent, int) 分别对应着Inte...
分类:
移动开发 时间:
2016-04-01 18:07:50
阅读次数:
253
pendingIntent字面意义:等待的,未决定的Intent。要得到一个pendingIntent对象,使用方法类的静态方法 getActivity(Context, int, Intent, int),getBroadcast(Context, int, Intent, int),getSer ...
分类:
移动开发 时间:
2016-03-30 22:16:35
阅读次数:
231
Android Notification在每一个Android应用开发中基本都会遇到,它可以按指定的规则向用户推送一些消息,是一项非常实用的功能。本文主要介绍了Android Notification 用法的4种形式,希望可以对各位Android开发者有所帮助。 实现通知一般有以下几个步骤: 1.获 ...
分类:
移动开发 时间:
2016-03-29 21:01:16
阅读次数:
181
一.通知(NSNotification) NSNotification 通知类,这个类中有 NSNotificationCenter 通知中心类 NSNotificationCenter* notification = [NSNotificationCenter defaultCenter]; 添加 ...
分类:
其他好文 时间:
2016-03-29 19:24:10
阅读次数:
151
消息推送分两种: 1.本地推送(Local Notification) 2.远程推送(Remote Notification) 消息推送的作用 可以让APP不在前台,告知用户APP内部发生了什么 消息推送的效果 1.没有效果 2.横幅 在屏幕的顶部显示具体内容 3.提醒 UIAlertControl ...
分类:
其他好文 时间:
2016-03-28 21:31:12
阅读次数:
153
(1)post Notification类 (2) Notification的观察者类 ...
分类:
其他好文 时间:
2016-03-28 18:46:26
阅读次数:
166