pacjo / SmartspacerPlugins

Repository for my plugins for Smartspacer: Generic Weather, Local Battery, Sleep as Android and more
GNU General Public License v3.0
19 stars 3 forks source link

Battery Plugin Won't update after unplug #7

Closed froilanimnida closed 4 months ago

froilanimnida commented 4 months ago

I encountered this bug on my phone while using this plugin (battery plug-in) where the bug happens in the unplugged state

To describe the bug: When I plugged in the charger it did update and added the target onto the widget it worked normally such as updating the progress (percent). However, when I unplugged the charger from my phone the complication wouldn't hide or be dismissed. The complication is persistent but once I re-set any settings of the plugin it'll hide right away.

For better demonstration of the bug I will attach a link that will contain the screen record of the bug: [https://drive.google.com/file/d/1evm2XwlrfyI2FPmhndN6YMT7QiXQEXrW/view?usp=drivesdk](Video Link (Google Drive))

pacjo commented 4 months ago

I know. It's fixed here: a81c0412018af7289bc3e0acf38ff906182a8031 (TLDR: I tried battery optimization). I'm attaching APK with the fix hopefully included (if I didn't mess up versions). app-localbattery-release.apk.zip

Don't close the issue yet, I'll close it after next release, there's a lot of reports of this, so I might even do that today.

froilanimnida commented 4 months ago

https://github.com/pacjo/SmartspacerPlugins/assets/61849282/0c58339c-7de2-4e87-900c-138e486c1f1e

Upon testing, this seems to work correctly, will continue to monitor if the error persists or occur after some time. Thanks!

pacjo commented 4 months ago

Great, new release is available here, so as mentioned, I'm closing this now.

froilanimnida commented 3 months ago

Additionally, Is it possible to make the charging status as complication rather than target? For minimal set ups.

pacjo commented 3 months ago

Additionally, Is it possible to make the charging status as complication rather than target?

There already is a battery level complication available, with voltage and current in the works. I don't think estimate will fit in the space we have.

froilanimnida commented 3 months ago

Additionally, Is it possible to make the charging status as complication rather than target?

There already is a battery level complication available, with voltage and current in the works. I don't think estimate will fit in the space we have.

I see, I am able to test the complication. However the settings where I can dynamically hide if my phone is charging isn't there though.

pacjo commented 3 months ago

the settings where I can dynamically hide if my phone is charging isn't there though.

That's because there isn't one. I could try writing a generic requirement for such cases.

froilanimnida commented 3 months ago

the settings where I can dynamically hide if my phone is charging isn't there though.

That's because there isn't one. I could try writing a generic requirement for such cases.

Alright, looking forward to it.

pacjo commented 2 months ago

Can you try this? app-localbattery-release.zip

It has the new charging status complication and requirement

Requirement isn't tied to anything specific, so you can add it to any target / complication.

froilanimnida commented 2 months ago

https://github.com/pacjo/SmartspacerPlugins/assets/61849282/2e5062eb-1071-4ed7-9622-85dc9e83d2fe

This update is working smoothly also the addition of voltage complication is updating when charging or not and providing data about the voltage from time to time.

pacjo commented 2 months ago

...also the addition of voltage complication is updating when charging or not and providing data about the voltage from time to time.

I have no idea what you mean. Is it working incorrectly?

froilanimnida commented 2 months ago

...also the addition of voltage complication is updating when charging or not and providing data about the voltage from time to time.

I have no idea what you mean. Is it working incorrectly?

Yup, sorry if my reply wasn't on the point. Also, it would be nice to make the battery icon of the complication to ⚡ rather than 🔋. But overall this update is good and working correctly.

pacjo commented 2 months ago

it would be nice to make the battery icon of the complication to ⚡ rather than 🔋.

Yeah, you're right. Next update.