1
0
mirror of https://github.com/danog/termux-api.git synced 2024-11-29 20:09:00 +01:00
Go to file
tomty89 3bfb11fe0f MicRecoderAPI: a few enhancements (#248)
* MicRecorderAPI: allow duration limit to be disabled with zero or negative

* MicRecorderAPI: avoid unnecessary MediaRecorder parameter in RecorderCommandHandler.handle()

* MicRecorderAPI: allow encoder and format to be set by user

All supported encoders can be set with their names. Unless a format
is set explicitly with its corresponding integer, a suitable format
would be chosen automatically for the chosen encoder.

* MicRecorderAPI: allow AudioSource to be set by user

Just in case, so it can only be set with the source's corresponding
integer.

* MicRecorderAPI: allow bit rate, sampling rate and number of channels to be set by user

* MicRecorderAPI: a couple of fixes

Have year before month and day in the default file name for better
sorting. Also fix the extension name in it for automatic format
selection. As we want the file to have extension name by default,
we have to pick a default format/encoder. AAC is chosen because it
is probably the most compatible one among different platforms.

* MicRecorderAPI: replace all getAbsoluteFile() with getAbsolutePath()

None of them were used in places where it should be a File.

* MicRecorderAPI: properly report unlimited MaxDuration

* MicRecorderAPI: make sure the recorder is released when not used

* MicRecorderAPI: remove aac_eld/he_aac/vorbis support

They are at least problematic on my phone. They either fail to work
or crash the API app. Sometimes the crash is even unrecoverable.
2019-01-25 01:07:53 +01:00
.github/ISSUE_TEMPLATE Add issue templates (#238) 2019-01-03 02:05:59 +01:00
.idea disableWrapperSourceDistributionNotification=true 2018-06-05 23:59:55 +02:00
app MicRecoderAPI: a few enhancements (#248) 2019-01-25 01:07:53 +01:00
gradle/wrapper Update gradle version 2019-01-10 23:39:29 +01:00
.gitignore Update gitignore for Android Studio 3.1 2018-04-02 01:38:10 +02:00
build.gradle Update android gradle plug-in 2019-01-10 23:52:42 +01:00
gradle.properties Update gradle 2016-04-28 12:46:05 +02:00
gradlew Update gradle configuration 2017-09-24 22:54:15 +02:00
gradlew.bat Update gradle and Android Studio 2016-09-26 22:43:16 +02:00
README.md Remove implemented features from ideas in readme / fix typo (#163) 2018-04-12 01:21:28 +02:00
settings.gradle Initial push 2015-07-26 02:23:21 +02:00

Termux API

Join the chat at https://gitter.im/termux/termux

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.