* DialogAPI Improvements / Enhancements * New Widgets: Date, Time, Spinner, Text-To-Speech, Confirmation * Results are returned as JSON including code of button pressed * Fix typo * Add BottomSheet InputMethod type * Change DialogActivity to AppCompatActivity * Add support library dependency to gradle * Change theme to be compatible with AppCompatActivity * Refactor getSpinnerItems to getInputValues so BottomSheet can use as well * Add Radio InputMethod * Better touch outside dialog cancellation behavior * Prevent speech InputMethod from being cancelled on touch outside * Add Counter InputMethod * Add CheckBox InputMethod * Change FrameLayout to be NestedScrollView to handle scrolling large dialogs as necessary * Add custom range for CounterInputMethod * Set text for ConfirmInputMethod * Add numeric option / other minor tweaks * change password type to a boolean option instead of string * allow multiline password (text only not numeric) * Allow text hint to be set for SpeechInputMethod
Termux API
This is an app exposing Android API to command line usage and scripts or programs.
When developing or packaging, note that this app needs to be signed with the same key as the main Termux app for permissions to work (only the main Termux app are allowed to call the API methods in this app).
License
Released under the GPLv3 license.
How API calls are made through the termux-api helper binary
The termux-api client binary in the termux-api
package generates two linux anonymous namespace sockets, and passes their address to the TermuxApiReceiver broadcast receiver as in:
/system/bin/am broadcast ${BROADCAST_RECEIVER} --es socket_input ${INPUT_SOCKET} --es socket_output ${OUTPUT_SOCKET}
The two sockets are used to forward stdin from termux-api
to the relevant API class and output from the API class to the stdout of termux-api
.
Client scripts
Client scripts which processes command line arguments before calling the termux-api
helper binary are available in the termux-api package.
Ideas
- Wifi network search and connect.
- Add extra permissions to the app to (un)install apps, stop processes etc.