From: Permondes Date: Tue, 17 Nov 2020 17:02:54 +0000 (+0100) Subject: First Documentation X-Git-Url: https://permondes.de/gitweb/TermuxBatteryStatus.git/commitdiff_plain/HEAD?ds=sidebyside First Documentation --- diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..dab9f15 --- /dev/null +++ b/Readme.md @@ -0,0 +1,38 @@ +Battery Status of an Android Phone +================================== + +Plug your Android device to a power supply and start this shell script. The script will inform you when the battery is loaded to about 80%. +Generally, keeping the battery loaded to 40 - 80% increases its live time. +The application terminates when this threshold is passed or when the device is not attached to a power supply. +As the delay between battery checks is 5 minutes (to reduce power consumption), it may take up to 5 minutes to terminate. + +This application is based on Termux which runs a shell script. Termus is a kind of Linux running on Android devices. + +What you need is: +----------------- + +**Apps:** + + * Termux: Terminal-Emulator + * Termux:API: To access the Android-Functions + * Termux:Widget: To place the script as Widget on the Android-Desktop + +**Termux Packages** + + * termux-api: from Termux:API + * jq: Analysing `json` data. termux-battery-status returns the data in `json` format + +Place the script into the folder `~/.shortcuts/tasks` + +*It may take up to 1 minute before the result is returned.* + +Hints +----- + + * How can I access device storage with Termux? + Run `termux-setup-storage`. It will ask for permission and once it was granted, it will setup symlinks in directory ~/storage to standard directories like DCIM, Download, etc. + +References +---------- + +* https://wiki.termux.com/wiki/Main_Page