Reputation: 31
I have used following code for overlaying android activity over the screen even if the screen is off.
val wakeLock = powerManager.newWakeLock( PowerManager.FULL_WAKE_LOCK or PowerManager.ACQUIRE_CAUSES_WAKEUP or PowerManager.ON_AFTER_RELEASE, "YourApp::AlarmWakeLock" )
but from this code PowerManager.FULL_WAKE_LOCK and PowerManager.ACQUIRE_CAUSES_WAKEUP are deprecated is there any solution or better alternative for this?
Code which can replace the current implementation.
Upvotes: 0
Views: 28