Hi, First of all, thanks for making this app, It's super simple and lightweight. 😃
I found a little problem, that app shows ampere when charge in negative number, but when discharge it reports positive number.
here's the illustration:
SS on #6
OS is Lineage 17.1 Android 10
App version 1.4.3 / latest
You are correct. I was overcomplicating the logic. I'll be removing the ternary statement and the charging sign will be whatever the device is outputting. Expect the change in the next release.
Hi, First of all, thanks for making this app, It's super simple and lightweight. 😃 I found a little problem, that app shows ampere when charge in negative number, but when discharge it reports positive number. here's the illustration: SS on #6
OS is Lineage 17.1 Android 10 App version 1.4.3 / latest
Thanks
FINAL INVESTIGATION You're wrong on these logic https://github.com/TylerWilliamson/BatteryNotification/blob/e201b6a30f17b294d32c12aa1af5d213e24634c3/app/src/main/java/com/ominous/batterynotification/util/BatteryUtils.java#L119
const BATTERY_STATUS_CHARGING = 2
andconst BATTERY_STATUS_DISCHARGING = 3
so the firstIF true = 1
not-1
int batteryCurrent = (intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1) == BatteryManager.BATTERY_STATUS_CHARGING ? 1 : -1)