v0.54.0 - 2026-12-06
Commit history: Do not show Add support in Throw dedicated exception and show notification for repeat calls to Attempt to activate Catch all exceptions when starting recording instead of just Ask user to set ! Add For Android
v0.53.0...v0.54.0
Changelog
Fixed
java.io.IOException: Connection refused error notification if it was due to API server process being killed before it was able to receive the result. Closes #782, Closes #887 (comment). (c4dee53d057c, 3676676cb372, 62f9628faf00)
SocketListener for long extras (--el) (Error Unsupported argument type: --el api_server_starttime xxxxxxxx). Closes #937. (374431c9f411)
ResultReturner.returnData() by an API command. (fc26ce17e3ba)
NotificationListenerService and then check every 1s for next 15s to see if it became active (Error java.lang.NullPointerException: Attempt to invoke virtual method 'android.service.notification.StatusBarNotification[] android.service.notification.NotificationListenerService.getActiveNotifications()' on a null object reference). Closes #662, #899. (eef397759f79)
IllegalStateException and IOException. (224d5eb627c6)
Allow all the time for location permission on Android >= 11. The location permission page that Termux:API starts if permission is missing does not have the Allow all the time option and only the Allow only while using the app, which is not enough to access location while Termux app is in background. There are Android APIs to request it, they can be looked into in future. (ee29d4314ca4)
LocationService to handle termux-location commands and use CountDownLatch to wait for responses instead of Thread.sleep() shenanigans and fix updates/once commands.
termux-location -p gps -r updates will now send responses in an array at root level, where each response will get added as a dict inside the array.
termux-location commands at once.
termux-location -r updates command sends responses for the next 30 seconds, with a minimum interval of 5 seconds. Previously, minimum distance between location updates was 50 meters, but now it is 1 meter to support location updates while walking for people who like to touch grass. In future these parameters can be configurable.
>= 11, if Termux:API gets frozen, the Termux:API app will not be able to send back location and other API command responses, and native termux-api commands will hang, sometimes in between responses, like after only getting 1 or 2 location updates before the 30s complete. It is recommended to use adb shell "settings put global cached_apps_freezer disabled" to disable freezing, and then at least start Termux:API app once from the launcher in case it was already frozen. Check #638 (comment) for more info. You may instead try termux-api-start command to start a foreground service, but it may get killed anytime too.