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.2k stars 438 forks source link

A way to get watch battery information #385

Open storm1er opened 3 years ago

storm1er commented 3 years ago

Feature description

Provide a way to get watch's battery state, with the same reason wy we would want phone's battery state.

Reference implementation

Have you checked if the feature is accessible through the Android API? Not really, but it's seems clear we will need a termux:API variant for wear os. See https://stackoverflow.com/questions/25884383/get-battery-level-of-connected-smartwatches

Do you know of other open-source apps that has a similar feature as the one you want? (Provide links) Not in open source, but you may want to talk with the developer of this app to get some help if needed : Phone battery, it adds a widget to see the watch battery state: https://play.google.com/store/apps/details?id=com.ppltalkin.phonebatterylevel developer's registered mail: ppltalkin@gmail.com

Wetitpig commented 3 years ago

I am actually not sure if that would be possible. Basically, all smartwatches are communicated with payloads, including the battery level. Unless there is a unified API / message payload I don't think it could be implemented for any smart watches...

HusniMuhammad commented 11 months ago

Use this command

termux-battery-status

If it's works please close this issue

Wetitpig commented 10 months ago

Use this command

termux-battery-status

If it's works please close this issue

This only concerns the battery of the phone, not the watch