Repository navigation
v0.54.0 - 2026-12-06
Commit history: v0.53.0...v0.54.0
Changelog
Fixed
-
Do not show
java.io.IOException: Connection refusederror 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) -
Add support in
SocketListenerfor long extras (--el) (ErrorUnsupported argument type: --el api_server_starttime xxxxxxxx). Closes #937. (374431c9f411) -
Throw dedicated exception and show notification for repeat calls to
ResultReturner.returnData()by an API command. (fc26ce17e3ba) -
Attempt to activate
NotificationListenerServiceand then check every 1s for next 15s to see if it became active (Errorjava.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) -
Catch all exceptions when starting recording instead of just
IllegalStateExceptionandIOException. (224d5eb627c6) -
Ask user to set
Allow all the timefor location permission on Android>= 11. The location permission page that Termux:API starts if permission is missing does not have theAllow all the timeoption and only theAllow 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) -
! Add
LocationServiceto handletermux-locationcommands and useCountDownLatchto wait for responses instead ofThread.sleep()shenanigans and fixupdates/oncecommands.- The
termux-location -p gps -r updateswill now send responses in an array at root level, where each response will get added as a dict inside the array. - Now multiple location responses should be properly received, including being able to run multiple
termux-locationcommands at once. - The
termux-location -r updatescommand 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.
For Android
>= 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 useadb 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 trytermux-api-startcommand to start a foreground service, but it may get killed anytime too. - The