摘要: 总共有两类方法:一、代码直接判定二、接收广播现在先说第一类方法(代码直接判定):1、通过PowerManager的isScreenOn方法,代码如下:PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SER... 阅读全文
posted @ 2015-06-20 20:22 Anumbrella 阅读(817) 评论(0) 推荐(0) 编辑
摘要: Intent用于启动Activity, Service, 以及BroadcastReceiver三种组件, 同时还是组件之间通信的重要媒介.使用Intent启动组件的优势1, Intent为组件的启动提供了一致的编程模型. 无论想要启动的组件是Activity, Service, 还是Broadca... 阅读全文
posted @ 2015-06-20 19:49 Anumbrella 阅读(182) 评论(0) 推荐(0) 编辑