pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
boolean screen = pm.isScreenOn();
如果你要监听屏幕开关的事件的话, 你需要监听这个两个ACTION_SCREEN_OFF and ACTION_SCREEN_ON intent broadcast
pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
boolean screen = pm.isScreenOn();
如果你要监听屏幕开关的事件的话, 你需要监听这个两个ACTION_SCREEN_OFF and ACTION_SCREEN_ON intent broadcast