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
I've noticed there is activity attribute in the AndroidManifest.xml called android:showOnLockScreen="true|false"
for example:
I searched the web for its documentation but no luck, but from its name it should work as the Window flag WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED do.
the only document I've found
Specify that an Activity should be shown over the lock screen and, in a multiuser environment, across all users' windows [boolean]
Edit
can you please try to call your flag code before calling super.onCreate(...)
public class BaseActivity extends Activity {
@Override
protected void onCreate(Bundle bundle) {
this.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
//then call super
super.onCreate(bundle);
.
.
.
}
}