Releases: termux/termux-api
v0.52.0
v0.52.0 - 2025-05-22 10:50
Commit history: v0.51.0...v0.52.0
Changelog
Fixed
-
Bump
termux-shared
toda3a0ac4e2
. 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 refused
exceptions 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 -p
to get all pending jobs.The
termux-job-scheduler --p
action will printNo jobs found
instead ofNo pending jobs
if no pending job exists.The
termux-job-scheduler --cancel-all
action will now print all jobs to be cancelled, orNo jobs found
found.The job description will use
4
spaces instead of a tab after the path.(
6fbf61aa
) -
Fix
termux-notification --icon
not 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 byNotificationAPI
for release builds.Closes #483.
(
1639e73f
) -
Fix
termux-notification
actions not updating or conflicting between notifications due to same request code being used for thePendingIntent
of all actions and also specifyPendingIntent.FLAG_IMMUTABLE
to 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 insideRunnable
lambda 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
ReportInfo
to be obfuscated making stacktraces harder to read.Related commit termux/termux-app@da3a0ac4.
(
28bc8c85
) -
Explicitly specify
PendingIntent.FLAG_MUTABLE
flag forPendingIntent
passed toNfcAdapter.enableForegroundDispatch()
. (5040a66f
) -
Check if
NfcAdapter
is available and notnull
inNfcActivity.onResume()
in addition toonCreate()
before calling its methods otherwise would trigger aNullPointerException
. (4ba140dd
) -
Fix
termux-nfc -t x
resulting 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
SmsInboxAPI
with new options and fix errors for non existent columns.The following options have been added. Check
termux-sms-list --help
for 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
,energy
andcycle
properties to battery API. FixBATTERY_PROPERTY_CURRENT_NOW
unit if required. Usepercentage
returned byBATTERY_PROPERTY_CAPACITY
instead 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_modified
attribute fortermux-saf-stat
andtermux-saf-ls
. Co-authored-by: @BryanJacobs and @agnostic-apollo (3f743003
) -
Add opus audio encoder. (
992ce17d
) -
Add monochrome icon. (
0eae9395
) -
Add
DUMP
andPACKAGE_USAGE_STATS
permissions. (989a19b7
) -
Add
INTERNET
permission. The internet permission may solve problems for Termux app not having internet access if Termux:API app is installed first due to AndroidsharedUserId
bugs which shares permissions across all apps. (ea094b0a
) -
Add support for unix filesystem sockets for API communication. (
fe6e3d48
) -
Add
workflow_dispatch
andcron
schedule for "00:15 on 1st of every 2nd month" togithub_action_build
workflow triggers. (f60affe5
) -
Add
capabilities
field totermux-wifi-scaninfo
output. 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
TermuxApiReceiver
andResultReturner
. This will allow users to know if an exception caused an API command to fail instead of having to checklogcat
. Currently,Termux:API
app is broken a lot and crash reports from users for edge case exceptions or device specific exceptions will help solve such issues. In future, likelystderr
will 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_STATE
permission forTelephonyAPI
IMEI and MEID. (8d6c6ce1
) -
Request
ACCESS_BACKGROUND_LOCATION
as required by android 10+.(7ef6b206
) -
Add dual sim feature to CallLog api. (
a8574836
) -
Notification channel support. Implemented by @tareksander in #477. (
75a5ffe3
)
Changed
-
Add
UsbService
to 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
TermuxAPILauncherActivity
activity 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 Icon
button 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
PhotoAPI
toCameraPhotoAPI
. (ac967e8a
) -
Do not hang indefinitely when exceptions are thrown in
TermuxApiReceiver
andResultReturner
. (3c1a6be8
) -
Fix potential NullPointerException in
StorageGetAPI
and use FileUtils for missing permissions check. (950f9be3
) -
Fix potential NullPointerException in
PhotoAPI
and use FileUtils for photo directory creation. (cc186d03
) -
Use
TERMUX_API_FILE_SHARE_URI_AUTHORITY
for content provided uri and fix sharing paths with "#". (9a9e3eae
) -
Remove hardcoded
com.termux
values. (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.ContentProvider
write 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
phone
key for message info and replace it withaddress
as address column can be a name like service provider instead of a number. (603f6d7c
)
Fixed
-
! Fix exception in
SmsInboxAPI
for 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 LIMIT
on 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.