PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); boolean screen = pm.isScreenOn();