Fr4nKB / Glyphify

Glyphify is an Android app made for Nothing Phones, it tries to make the Glyph interface more useful.
74 stars 4 forks source link

Phone 2A battery indicator not working when locked #5

Closed ProgettiPascon closed 1 month ago

ProgettiPascon commented 1 month ago

Hi all, just tried this awesome app and saw an odd behavior. I'll explain it better: When I plug in the charging cable, having the app open (I can see the notification) and the phone unlocked, the indicator works as expected. Then, if I lock the smartphone, it still works.

However, when I plug the charger having the device locked, the feature doesn't work anymore. Have you got any suggestion?

EDIT: I tried it on a Phone 2A.

Thanks in advance for your time, Giacomo.

ProgettiPascon commented 1 month ago

Just figured it out, sorry for bothering you, probably it was caused by energy saving mode being tuned on. 🙈

Fr4nKB commented 1 month ago

I should add that it's a good idea to set the app to Unrestricted for battery usage if you didn't already do it

ProgettiPascon commented 1 month ago

Unfortunately, even with every permission needed and app set to Unrestricted, it still doesn't work realiably. Glyphify is open, together with a bunch of other apps. The debugger notification says: "Glyphify is actively using the glyph interface" (or something similar), but the light doesn't turn on.

Moreover, the shown percentage seems not to be accurate. With the battery charged up to 99% the bar isn't full enough, to me at least. Here's a photo (99% charged): battery 99 percent

Fr4nKB commented 1 month ago

The issue with the bar not being full is due to the difference in the code used by Nothing's SDK to address glyph progression in Phone(2) and (2a). I prototyped my code using (2) which would explain this discrepancy.

For what it regards the unreliability that's probably due to the fact that Android kills the app after a while, especially if other apps are running, either to spare the battery or memory. Regardless, this can be fixed although it will be a less elegant solution and maybe more annoying since you'll have a constant notification even if your phone is not being charged.

I'll make these changes in the next version

Fr4nKB commented 1 month ago

@ProgettiPascon Let me know if v1.3.6 is better, I might still need to try a few things

ProgettiPascon commented 1 month ago

Hi, it seems to be working great now! Thanks for the update, I'll tell you in case of other issues.