List of utility methods to do Screen On
void | keepScreenOn(final Activity pActivity) keep Screen On pActivity.getWindow().addFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); |
void | keepScreenOn(final Activity pActivity) keep Screen On pActivity.getWindow().addFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); |
void | turnScreenOn(Activity context) Purpose - Force screen to turn on if the phone is asleep. if (context == null) return; try { Window window = context.getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); } catch (Exception ex) { ... |