Releases: termux/termux-api
v0.53.0
v0.53.0 - 2025-09-01
Commit history: v0.52.0...v0.53.0
Changelog
Fixed
- Fix
NullPointerExceptioninBatteryStatusAPIwhile converting anullIntegerto anintforbatteryCurrentNowand also do not outputnullvalues. (27a75996144b)
v0.52.0
v0.52.0 - 2025-05-22 10:50
Commit history: v0.51.0...v0.52.0
Changelog
Fixed
-
Bump
termux-sharedtoda3a0ac4e2. Related commit termux/termux-app@4de0caac. Related commit termux/termux-app@da3a0ac4. Related commit 28bc8c85. (a3a231e6) -
JobSchedulerAPI: Fix
ResultReturner.returnData()being called multiple times for different printing since 51a02f4 and 61262f7 throwingConnection refusedexceptions for calls after the first one instead of printing, and also refactor actions out to functions and change action output format.The
ResultReturner.returnData()will be called once for each action.The schedule job action will not print all pending jobs at end and only the pending job that was scheduled if successful. Users should use
termux-job-scheduler -pto get all pending jobs.The
termux-job-scheduler --paction will printNo jobs foundinstead ofNo pending jobsif no pending job exists.The
termux-job-scheduler --cancel-allaction will now print all jobs to be cancelled, orNo jobs foundfound.The job description will use
4spaces instead of a tab after the path.(
6fbf61aa) -
Fix
termux-notification --iconnot working for release builds as icon drawables were being removed by resource shrinker possibly related to 6ef2618.Use standard Android API to get resource id for drawable icon instead of using reflection into drawable class. Additionally use
String.format()so that resource shrinker does not remove icons used byNotificationAPIfor release builds.Closes #483.
(
1639e73f) -
Fix
termux-notificationactions not updating or conflicting between notifications due to same request code being used for thePendingIntentof all actions and also specifyPendingIntent.FLAG_IMMUTABLEto prevent any modification.(
7c1759a3) -
BatteryStatusAPI: Output double value instead of string for temperature field with value rounded up to 1 decimal place. (
97b41002) -
Manually add stack trace of caller function that called
ResultReturner.returnData()to exception messages as exceptions thrown insideRunnablelambda thread will not include it by default. (922f3585) -
Fix disabling obfuscation added in 6ef2618 caused due to wrong proguard file being used.
This caused Termux classes like
ReportInfoto be obfuscated making stacktraces harder to read.Related commit termux/termux-app@da3a0ac4.
(
28bc8c85) -
Explicitly specify
PendingIntent.FLAG_MUTABLEflag forPendingIntentpassed toNfcAdapter.enableForegroundDispatch(). (5040a66f) -
Check if
NfcAdapteris available and notnullinNfcActivity.onResume()in addition toonCreate()before calling its methods otherwise would trigger aNullPointerException. (4ba140dd) -
Fix
termux-nfc -t xresulting in error notification being shown as method was not returned from after sending error resulting inResultReturner.returnData()being called twice. (c986fb09)
v0.51.0
v0.51.0 - 2025-03-29 07:10
Commit history: v0.50.1...v0.51.0
Changelog
Added
-
Add
SAFAPI. Implemented by @tareksander in #476. (a546eeb5) -
Enhance
SmsInboxAPIwith new options and fix errors for non existent columns.The following options have been added. Check
termux-sms-list --helpfor examples and more info.conversation-limit=<limit>: The SQL limit for returned SMS conversations.conversation-offset=<offset>: The SQL offset for returned SMS conversations.conversation-return-multiple-messages: Return multiple SMS messages per conversation.conversation-return-nested-view: Return a nested object view of conversations where each conversation contains an array of SMS messages with the conversation id as the key.conversation-return-no-order-reverse: Return SMS conversations without reversing order of conversation sort.conversation-selection=<selection>: The SQL selection for returned SMS conversations.conversation-sort-order=<order>: The SMS conversations sort order as per SQL 'ORDER BY col1, col2, ... ASC|DESC' clause. Default value: 'date DESC'.message-return-no-order-reverse: Return SMS messages without reversing order of message sort.message-selection=<selection>: The SQL selection for returned SMS messages.message-sort-order=<order>: The SMS messages sort order as per SQL 'ORDER BY col1, col2, ... ASC|DESC' clause. Default value: 'date DESC'.
(
1b60b23c) -
Add
present,technology,voltage,current_avg,level,scale,charge_counter,energyandcycleproperties to battery API. FixBATTERY_PROPERTY_CURRENT_NOWunit if required. Usepercentagereturned byBATTERY_PROPERTY_CAPACITYinstead of using scale and level as suggested by @Wetitpig in #630. (d5364ef3) -
Add Termux:API app settings activity directly in the app itself so that the main Termux app is not required. Currently, it allows changing the log level. (
ed867bc3) -
Add
last_modifiedattribute fortermux-saf-statandtermux-saf-ls. Co-authored-by: @BryanJacobs and @agnostic-apollo (3f743003) -
Add opus audio encoder. (
992ce17d) -
Add monochrome icon. (
0eae9395) -
Add
DUMPandPACKAGE_USAGE_STATSpermissions. (989a19b7) -
Add
INTERNETpermission. The internet permission may solve problems for Termux app not having internet access if Termux:API app is installed first due to AndroidsharedUserIdbugs which shares permissions across all apps. (ea094b0a) -
Add support for unix filesystem sockets for API communication. (
fe6e3d48) -
Add
workflow_dispatchandcronschedule for "00:15 on 1st of every 2nd month" togithub_action_buildworkflow triggers. (f60affe5) -
Add
capabilitiesfield totermux-wifi-scaninfooutput. Closes #676. (cff225e4) -
Request disable battery optimizations and grant draw over apps permission. (
ba2836ba) -
Add support to send crash notifications if exceptions are caught in
TermuxApiReceiverandResultReturner. This will allow users to know if an exception caused an API command to fail instead of having to checklogcat. Currently,Termux:APIapp is broken a lot and crash reports from users for edge case exceptions or device specific exceptions will help solve such issues. In future, likelystderrwill be used instead, once support is added. (6112bf67) -
Add launcher icon/activity. This must not be allowed to be disabled since there is no other way to start Termux:API app again if it crashes multiple times and gets marked as bad process by android. This is also required to bypass OEM battery restrictions like DuraSpeed. This also easily allows users to know if the app is installed or not. Related issue termux/termux-widget#56. Related issue #447. (
f2c1342f) -
Add storage permissions since
PermissionUtils.checkPermissions()will check if app has requested them before checking if permission is granted. (ec390259) -
Declare
READ_PRIVILEGED_PHONE_STATEpermission forTelephonyAPIIMEI and MEID. (8d6c6ce1) -
Request
ACCESS_BACKGROUND_LOCATIONas required by android 10+.(7ef6b206) -
Add dual sim feature to CallLog api. (
a8574836) -
Notification channel support. Implemented by @tareksander in #477. (
75a5ffe3)
Changed
-
Add
UsbServiceto process usb api requests and fix multiple exceptions for Android 12+ and hang up for Android 14+. Co-authored-by: @agnostic-apollo and @9hm2. Closes #675. (15d5fb62) -
The
TermuxAPILauncherActivityactivity alias has been added forTermuxAPIMainActivity. This will allow disabling the launcher activity, but still allow the main activity to be launched from Termux app. The launcher activity will also now be allowed to be enabled again without having to reinstall the app with theEnable Launcher Iconbutton in the main activity if its currently disabled. (280e5c7c,bab9ef3a) -
Send plugin error notification instead of crash notification for uncaught exceptions for API calls. (
1f4a3f2c) -
Rename
PhotoAPItoCameraPhotoAPI. (ac967e8a) -
Do not hang indefinitely when exceptions are thrown in
TermuxApiReceiverandResultReturner. (3c1a6be8) -
Fix potential NullPointerException in
StorageGetAPIand use FileUtils for missing permissions check. (950f9be3) -
Fix potential NullPointerException in
PhotoAPIand use FileUtils for photo directory creation. (cc186d03) -
Use
TERMUX_API_FILE_SHARE_URI_AUTHORITYfor content provided uri and fix sharing paths with "#". (9a9e3eae) -
Remove hardcoded
com.termuxvalues. (3bea1942) -
Use night-mode instead of use-black-ui termux.properties property for setting DialogActivity theme as per termux/termux-app@6631599f. (
5c71e2df) -
Protect
ShareAPI.ContentProviderwrite access with permission in case it was allowed in future without setting permission. (2968854f) -
Add 5G NR radio support and additional fields for LTE for
TelephonyAPI. (dc89cd69)
Deprecated
- Deprecate
phonekey for message info and replace it withaddressas address column can be a name like service provider instead of a number. (603f6d7c)
Fixed
-
! Fix exception in
SmsInboxAPIfor message address/from selection and use exact match. Users can use%wildcards in the address passed if they want to do prefix/contains/suffix matching. (12e7b651) -
Fix usb fd not being sent due to refactoring in 3c1a6be. Closes #643. (
4c6a5196) -
Fix vibration not happening if duration is under 1000ms and touch vibration is disabled. Closes #666. (
a9abc964) -
Fix exception in ResultReturner while setting result for a non-ordered broadcast. (
e994de52) -
Fix bool extras parsing for
SocketListener. (8bd22936) -
Fix termux-call-log api
IllegalArgumentException: Invalid token LIMITon Android 11+ since limit and offset are being passed as sort parameters inst...
v0.50.1
Re-release of v0.50.0 with semantic versioned github release tag since APK attachment to release failed previously. Too late to do this without version bump since F-Droid has already detected v0.50.0 release.
v0.50
Noticeable changes, except for various cleanup and "under-the-hood" improvements, include:
- fix sender name in termux-sms-list
- fix so that inbox message filtering works in termux-sms-list
- fix so that termux-camera-photo works (at least on Samsung devices)
- add the option for api scripts to communicate with termux-api through a unix socket, thereby decreasing execution time
Thanks to all the contributors!
v0.49
v0.48
-
Support choosing sim card slot to use when sending text messages. Thanks @andremarcais.
-
Add possibility to sort text messages per conversation instead of just date. Thanks @rsanjuan87.
-
Enumerate more camera info capabilities. Thanks @tstein.
v0.47
v0.46 (F-Droid only)
Added support for reading/writing data to NFC Ndef tags.
v0.45 (F-Droid only)
- Minor fix for
termux-telephony-*commands. - Call log and SMS functionality is added back.