1)Cordova(Webview) based android app.
2)Launch the app and screen times out peoperly as per device settings.
3)From application side we are not acquiring any SCREEN_BRIGHT_WAKE_LOCK or ON_AFTER_RELEASE.
4)When app put to background and brought to foreground, device screen light never times out.
4)From application side we are not acquiring any SCREEN_BRIGHT_WAKE_LOCK or ON_AFTER_RELEASE.
5)Basically when coming to foreground the PowerManager is acquire ON_AFTER_RELEASE | SCREEN_BRIGHT_WAKE_LOCK(0x2000000a) wake-lock on behalf of our app 10311 and screen is kept on.
Line 58354: 08-14 22:49:22.280 D/PowerManagerService( 1088): [api] acquire WakeLock flags=0x2000000a tag=WindowManager uid=1000 pid=1088
08-14 22:50:22.000 I/PowerManagerService( 1088): [PWL] SCREEN_BRIGHT_WAKE_LOCK 'WindowManager' ON_AFTER_RELEASE (uid=1000, pid=1088, ws=WorkSource{10311}) (elapsedTime=59719)
6)Starting Android System WebView 59.0.3071.25 beta(Fails to work) ( May 4, 2017)
https://www.apkmirror.com/apk/google-inc/android-system-webview/android-system-webview-59-0-3071-25-release/android-system-webview-59-0-3071-25-android-apk-download/
screen timeout issue is seen.
7) Issue is not seen android 7.0 which uses chrome v59 as webview.
Device used: Note 4(5.0.1)
Webview version: 59.0.3071.125
Early versions of WebView were integrated as part of the core OS. Users could only update WebView through larger system updates. With the release of Android 5.0, Google separated WebView from the core OS.
Keep in mind that occasionally, Android system updates may reenable and update system apps like WebView. You can easily disable it again if this happens. As a general rule, it's not hurting anything to leave it enabled. While there was a glitch affecting Android 12 users back in 2021, Google has since resolved it.
You can try to use this plugin:
https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin
window.plugins.insomnia.keepAwake() to keep the screen awake
window.plugins.insomnia.allowSleepAgain() to allow sleep again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With