I have an activity that needs to turn screen on(if offed) when it is started. So in onCreate, I have:
this.getWindow().setFlags( WindowManager.La
Add android:configChanges="keyboardHidden|orientation|screenSize" to you Activity in your Manifest. This may solve your problem.
android:configChanges="keyboardHidden|orientation|screenSize"
Activity
Manifest