Android Question How to "set" the value of battery remain indicator?

Diego Marcelo Croatto

Member
Licensed User
Longtime User
Hello ... I supply the tablet with a external supply, I need use the USB/OTG for capture real time data with a PL2303 module and I cant supply over USB connector. The question is.... If possible set the value of the remaining battery?...I thought that the tablet sampled the amount of charge remaining in the battery but it is calculated when the tablet is turned on. The battery indicator indicates that the battery is discharged when it is actually connected to a fixed source and if the battery indicate very low the system turn off the tablet. What I would like to know if you could modify the value of the battery charge from the program periodically to indicate that it is charged and never turn off the tablet.
Thank's a lot!....
IMG_20181126_001801.jpg
 

Diego Marcelo Croatto

Member
Licensed User
Longtime User
Yes Erel.... the supply never change but the battery indicator shows the discharge. I think thath android calculates the remaining battery duration when the tablet start and not sample the current remaining in the battery. When I turn on the tablet the battery level indicator shows 100% and here start to show the discharge. You are shure that with an USB otg Cable and a powered USB/HUB I can supply the tablet and make work the USB to Serial converter? Thank's
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You are shure that with an USB otg Cable and a powered USB/HUB I can supply the tablet and make work the USB to Serial converter?
As you can see, nothing is sure when it comes to Android and USB devices. This is not a common used feature and different devices behave differently.

Worth trying. It did work for me with an old Android tablet.
 
Upvote 0
Top