GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2018-Oct-12

Title: Android query
Post by: MrPlow on 2018-Oct-12
Hi Guys

I have a couple of apps that are reporting Background Partial Stuck Wake Locks for 3% of sessions of late.
It doesn't sound a lot but Google guidelines are to aim for less than <1%

one culprit is Audiomix and the Android os version involved is 8.0+ but wondering if anyone else fixed this issue in the past?
In the meantime I will try to find the cause before the novemeber update deadline.

Title: Re: Android query
Post by: spacefractal on 2018-Oct-14
im havent touch mobile dev in quite a long time, since as you know im have stopped it now. But Its property a SLDActivity.Java issue here, not in the c++ code at all.

Im guess, you should try to remove  this code from OnCreate:

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

FLAG_KEEP_SCREEN_ON needs property being turned off when the app is paused, but that is not happens.

There is a Android.ScreenLock(FALSE/TRUE) in Android Extras as well. Standard is TRUE.
Title: Re: Android query
Post by: MrPlow on 2018-Oct-15
Thanks SF,

Good suggestions I will look into those!