获得电话状态需要在请电脑文件中添加如下权限监听电话的步骤: 说用到主要方法:void listen(PhoneStateListener listener, int events) Registers a listener object to receive notification of chan...
分类:
其他好文 时间:
2015-01-23 21:24:16
阅读次数:
208
iOS: 消息通信中的Notification&KVO在iOS: MVC中,我贴了张经典图:其中的Model向Controller通信的Noification&KVO为何物呢?在功能上说,delegate、Notification以及KVO的功能类似,都是作用于 OC中对象 的消息通信。但三者的使用...
分类:
移动开发 时间:
2015-01-23 19:51:15
阅读次数:
185
1、AlarmManager,顾名思义,就是“提醒”,是Android中常用的一种系统级别的提示服务,在特定的时刻为我们广播一个指定的Intent。简单的说就是我们设定一个时间,然后在该时间到来时,AlarmManager为我们广播一个我们设定的Intent,通常我们使用 PendingIntent,PendingIntent可以理解为Intent的封装包,简单的说就是在Intent上在加个指定的...
分类:
移动开发 时间:
2015-01-23 18:28:16
阅读次数:
194
一个对象状态改变,通知正在对他进行观察的对象,这些对象根据各自要求进行改变; 在cocoatouch框架中,NSNotification机制和KVO使用了观察者模式通知(notification)机制原理图 在通知机制中,对某个通知感兴趣的所有对象...
分类:
移动开发 时间:
2015-01-23 12:47:27
阅读次数:
249
一、Redis Sentinel是redis自带的集群管理工具,主要功能有· 监控(Monitoring):Redis Sentinel实时监控主服务器和从服务器运行状态。· 提醒(Notification):当被监控的某个Redis服务器出现问题时,Redis Sentinel可以向系统管理员发送...
分类:
其他好文 时间:
2015-01-22 19:42:25
阅读次数:
159
- (void)statusBarOrientationChange:(NSNotification *)notification{ WClassAndFunctionName; UIInterfaceOrientation oriention = [UIApplication shar...
分类:
移动开发 时间:
2015-01-20 19:54:25
阅读次数:
305
IOS使用的技术叫做:APNS(Apple Push Notification Service)
Android使用的官方技术叫做:GCM(Google Clouding Messaging)
但是Android的GCM是开发者自己选的也可以自己实现,但是IOS就必须要走他的APNS才可以。
APNS和GCM本质上都是在系统中存在一个基于TCP协议的一个长连接,一直保持与服务器的连接...
分类:
移动开发 时间:
2015-01-19 14:31:12
阅读次数:
225
man epoll:NAME epoll - I/O event notification facilitySYNOPSIS #include DESCRIPTION The epoll API performs a similar task to poll(2)...
分类:
系统相关 时间:
2015-01-19 12:33:17
阅读次数:
282
一、远程推送通知 远程推送服务,又称为APNs(Apple Push Notification Services)。简单推送流程如下:二、极光推送通知 JPush iOS Push 包括 2 个部分,APNs 推送(代理),与 JPush 应用内消息。 1、APNs 推送,JPush 代理开发者.....
分类:
其他好文 时间:
2015-01-17 20:48:58
阅读次数:
207