1
0
mirror of https://github.com/danog/termux-api.git synced 2024-11-26 20:04:42 +01:00
Go to file
2015-11-28 11:56:37 +01:00
.idea Add android studio xml file 2015-07-31 01:15:32 +02:00
app Cleanup build.gradle 2015-11-28 11:56:37 +01:00
gradle/wrapper Update gradle from 2.7 to 2.9 2015-11-28 11:17:05 +01:00
.gitignore Initial push 2015-07-26 02:23:21 +02:00
build.gradle Update gradle 2015-08-01 01:45:27 +02:00
gradlew Update gradle from 2.7 to 2.9 2015-11-28 11:17:05 +01:00
gradlew.bat Initial push 2015-07-26 02:23:21 +02:00
README.md Add GPLv3 license information (fixes #4) 2015-11-03 12:18:51 +01:00
settings.gradle Initial push 2015-07-26 02:23:21 +02:00

Termux API

This is an app exposing Android API to command line usage and scripts or programs.

License

Released under the GPLv3 license.

The termux-api client helper binary

The client helper binary (termux-api.c) generates two linux anonymous namespace sockets, and passes their address as in:

/system/bin/am broadcast ${SERVICE_CLASS} --es socket_input ${INPUT_SOCKET} --es socket_output ${OUTPUT_SOCKET}

where the sockets are used to transfer:

  • input through stdin to the helper binary are forwarded to java code
  • java code may output feedback which are forwarded to the stdout of the helper binary

Client scripts

Client scripts which processes command line arguments before calling the termux-api helper binary are available in the termux-api package.

Ideas

  • Method for playing audio files using the system MediaPlayer, so termux-play myfile.ogg would play the audio file.
  • Wifi network search and connect.
  • Proximity sensor.
  • Accelerometer.
  • LED Flash.