Stuck partial wake locks - AudioMix
Asked Answered
H

1

7

First of all, I'm not really sure if this is the right place to report this issue but can't find any info or any kind of documentation anywhere.

Couple days(maybe weeks) ago Android Vitals started to alerting us about "Bad behaviour" in the Google Play Dashboard. The alert says "Stuck partial wake lock" and we got it on all of our applications but on really low percentages. Currently, the highest ratio is 0.93%. I'm not sure what was that about since we don't have any wake locks in our apps so I started digging.

So far found a couple of interesting things:

  1. Each wake lock has TAG and looks like Android Vitals are tracking them by that TAG. The TAG that appeared most is AudioMix;

  2. Most of the devices experiencing the stuck wake lock are Huawei: Android Vitals

  3. Probably important detail - all of the apps are WebView based. We have some native functionalities(IAP, AdMob, Firebase), but let's say 90% of the application is web content.

  4. I used adb tool to check what wake looks are running and how long are they running. So I did a couple scenario:

    • Using my application: After starting the app AudioMix wake lock starts. If I kill the app, AudioMix wake lock stops immediately, which is proper behaviour. But when I put application on background AudioMix wake lock stuck for like 1-2 min. I assume this is the problem;
    • Random native game from Play Store: The same steps above but AudioMix stops immediately on the background.
    • Random website in mobile Chrome: Now, this is really interesting. On background AudioMix stucks again around 1-2 min.

Kinda lost here but it seems like this is a problem with the Chromium. Is there something that I can 'magically' hardcore. I have read the post on this site but it seems like this is not the case here. Any suggestions?

Histrionic answered 27/1, 2020 at 8:36 Comment(2)
Have any solution on this? Something new?Berberine
Hello Saeed! We have had the same problem for a long time. Were you able to solve it?Mechanotherapy
S
-3

KungFuFlames welcome to the SO community.

Recently I'm also stuck on a similar kind of problem-related to Chinese OS especially the most popular one Huawei as my App is not working properly on the Huawei Devices. To find a solution I do long research on it and found so many new things such as Doze-Mode, Stand-by-Mode, WakeLocks, and a proper way of Background Executions and their limits. Although I haven't found the solution yet.

To know what is Wake Lock you must know the Android Doze Mode

So What is Doze Mode?

Starting from Android 6.0 (API level 23), Android introduces two power-saving features that extend battery life for users by managing how apps behave when a device is not connected to a power source. Doze reduces battery consumption by deferring background CPU and network activity for apps when the device is unused for long periods of time. App Standby defers background network activity for apps with which the user has not recently interacted.

You can more find out here about Doze Mode

Now we can easily understand what is Wack Locks and why we use them which is Simply to Overrides the Doze Mode and to Keep the CPU on.
These links Might also helps you a lot Keep the CPU on and this

What you are facing is called Stuck partial wake-locks in this documentation they provide the solution to fix this error.

A partial wake lock becomes stuck if it is held for a long time while your app is running in the background (no part of your app is visible to the user).

What you'ar getting no your play console is this Android Vitals

Scouring answered 27/1, 2020 at 11:34 Comment(1)
Where is the solution to OP's question?Secundine

© 2022 - 2024 — McMap. All rights reserved.