3.11 How can I keep screen on all the time when my app is running?


The screen will return to desktop after user stop using the APP for a certain period of time. Call methods from native Android SDK to keep screen awake if the APP need to be kept onfront. You can use example code below to keep screen on all the time.

ExampleCode:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);


results matching ""

    No results matching ""