What should I replace SCREEN_DIM_WAKE_LOCK with?

It can be replaced for FLAG_KEEP_SCREEN_ON, as the javadoc says, but this will prevent the screen from dimming - it will remain bright.

This API should not have been deprecated - it is still needed in some cases, such as the "dim" case.

See also this.


Android Developer documentation specifies that SCREEN_DIM_WAKE_LOCK should be replaced with FLAG_KEEP_SCREEN_ON. After doing a bit of digging, I turned up this...

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

It should be placed in the onCreate() method.