adolfintel / OpenPods

The Free and Open Source app for monitoring your AirPods on Android
https://fdossena.com/?p=openPods/index.frag
GNU General Public License v3.0
932 stars 161 forks source link

Not functioning on emui #89

Closed Mattis142 closed 4 years ago

Mattis142 commented 4 years ago

I read this on multiple airpods battery apps so far and non of them worked as well but they often mentioned that there's a high chance the app wouldn't work on my (huawei) Honor Play and I wish I'd know what causes the issue and if I can maybe fix it using adb or something else but I haven't gotten a detailed explanation of the issue and why it seems to be accuring on mostly emui/huawei devices?

Domi04151309 commented 4 years ago

I'm not quite sure about this but it's very likely because of battery optimization which is just way too aggressive on EMUI and just kills everything that's not whitelisted. This makes apps that run services in the background basically non-functional.

adolfintel commented 4 years ago

@MKCOOL142 Does the older version (1.3) work? If so, I guess I'll have to revert most of the changes made by @Electric1447 in 1.4 since you're the second person to have problems with it. That would really suck though :(

Electric1447 commented 4 years ago

EMUI has the heaviest battery optimization. Should be better to create a "legacy" version based on 1.3 instead of impacting the future compatibly for other devices

adolfintel commented 4 years ago

I think the issue is the new target SDK, some ROMs completely ignore the disable battery optimization request if the SDK is higher than 26 I think. If that's the case maybe we can go back to a target of 23 with some minor changes.

Electric1447 commented 4 years ago

I could work on a "compatibly"/"legacy" version/branch running on max and target sdk 23.

Creating an app in 2020 with target sdk 23 is a bad idea

adolfintel commented 4 years ago

Let's wait for OP to confirm whether 1.3 works or not before doing that

Mattis142 commented 4 years ago

I'm not quite sure about this but it's very likely because of battery optimization which is just way too aggressive on EMUI and just kills everything that's not whitelisted. This makes apps that run services in the background basically non-functional.

I agree, battery optimization is an issue but there are tricks and settings to minimize the likeliness of the app getting killed and it also didn't work on the foreground so it can't be the issue

Mattis142 commented 4 years ago

@MKCOOL142 Does the older version (1.3) work? If so, I guess I'll have to revert most of the changes made by @Electric1447 in 1.4 since you're the second person to have problems with it. That would really suck though :(

I cannot get 1.3 to work either, how long does it take the app to recognize the airpods? and is there some sort of difference if I only open the case and don't take the individual airpods out?

Mattis142 commented 4 years ago

Well after some research I found a faq section of a different airpods app and they said that airpods 2 don't work on most phones, especially on most huawei phones so I guess I'll just have to guess the battery percentage from now on, I also highly doubt that these are fake because I connected them to a different iPhone (to remap the double tap gesture) and they connected like real ones so I don't see that as an option

Mattis142 commented 4 years ago

The FAQ site if you're interested: http://airbattery.de/faq.html (just ctrl+f for huawei)

adolfintel commented 4 years ago

Ok, good to know it wasn't caused by @Electric1447 's contributions. We'll implement a warning to inform users of MIUI and EMUI about this issue