termux / termux-api

Termux add-on app which exposes device functionality as API to command line programs.
https://f-droid.org/en/packages/com.termux.api/
2.22k stars 442 forks source link

Add voltage data to termux-battery-status #578

Open cledsupper opened 1 year ago

cledsupper commented 1 year ago

Feature description Add the voltage attribute in JSON data returned by termux-battery-status command.

I need this data for getting rid of difficulties lead by ADB configuration in an application prototype I'm developing with Termux:API, the MoniBat.

Reference implementation

Here is an Android Developer documentation which shows the voltage data can be obtained by the Intent.ACTION_BATTERY_CHANGED: BatteryManager.

uncharted9898 commented 1 year ago

Edit: Solved https://github.com/termux/termux-api/pull/623