Questions about Battery Manager from Taifun

@Taifun Hello everyone, hello Taifun

first of all, your website with a collection of extensions is amazing.

I have got some little questions about the properties of your Extension Battery Manager.

My tablet is running with Android 9 and i installed your battery.aia by building an .apk with app inventor.
The only thing i changed before building was that i added a clock (1ms) and put all the blocks from Screen1.Initialize into Clock1.Timer just like you can see in the pictures:


(I did this because i want to see the CurrentNow value updated continuously.)

In the description on your website you say that the properties "CurrentAvg, CurrentNow and ChargeCounter" are in microampere... however in your pre built .aia they are in mA, milliampere. Am i missing out on something here?

I hope i am guessing right if i say that all of these three are actually milliampere, mA values?

Also the Current Avg Value always shows -9223372036854775808 on my tablet:

Is that because of the hardware which would provide this value does not support sending out this value like you mentioned with "...The time period over which the average is computed may depend on the fuel gauge hardware and its configuration." or am i also doing something wrong here?

Greetings,
Max

sorry... microampere is correct
see also the official Android documentation for further details and clarification
https://developer.android.com/reference/android/os/BatteryManager#BATTERY_PROPERTY_CURRENT_AVERAGE

Taifun

hi, i have a problem with this extension, i have an old android tablet 4.4.2 that i use with the Companion or USB, all the APPs created work fine but when i installed your very useful extension Battery Manager, Companion/USB no longer work, is it not compatible with my android version? can i do something to make it work? (so as not to buy a new tablet)
however once the .APK is generated the installed app works very well

did you restart the companion app after importing the extension?
any error message?

that's the most important thing!
it might be there are some minimum API requirements for some methods, for details see also BatteryManager  |  API reference  |  Android Developers

Taifun

I restarted both Companion and aiStarter
OS: Android 4.4.2 (API 19)
I only use .Level .Status
the error is "NETWORK ERROR"
for USB: "Companion connection error"
for Companion: "The companion has disconnected"
if it is not compatible, I have to give up with regret

Try to connect the companion via WiFi
Taifun

I've been trying since this morning, my pc doesn't support "Emulator" so the tests are only "Companion WiFi" and USB.
If I remove the extension, the connection works, I tried "deleting" the instance and the blocks but it didn't work
p.s.
I want to add that another APP also does not work and has the extension: com.KIO4_HexToDec.aix

I found out that the batteryManager extension and the MQTT client cannot coexist, one or the other, I'm happy to use the old tablet for other purposes, thanks anyway.