Skip to content

Releases: termux/termux-widget

v0.14.0

16 Jan 21:52
6cbba5f
Compare
Choose a tag to compare

v0.14.0 - 2025-01-16

Commit history: v0.13.0...v0.14.0

Changelog

Added

  • Add dynamic shortcuts. Implemented by @fabian-thomas and @agnostic-apollo in #80. (6253df51, bf224475)

  • Add support for shared day/night theming based on night-mode termux.properties value. (397359b9)

  • Add SystemEventReceiver that receives the ACTION_BOOT_COMPLETED and ACTION_MY_PACKAGE_REPLACED intents to refresh widgets. This should help fix issues on any potential devices that fail to send the AppWidgetManager.ACTION_APPWIDGET_UPDATE intent that is normally sent by Android to the app for it to refresh its widgets, but do send other intents on boot or app updates and don't kill the app after app updates. (d480a8ae)

  • Refresh all widgets when main activity starts instead of having to press the Refresh Widgets button manually. (aed127d7)

  • Add support for refreshing all widgets in in-app button and passing 0 in am broadcast -n com.termux.widget/.TermuxWidgetProvider -a com.termux.widget.ACTION_REFRESH_WIDGET --ei appWidgetId <id> broadcast. This also allows a way to fix occasional non-responsive widgets after app updates if ACTION_APPWIDGET_UPDATE was not sent/received by Termux:Widget app. (497c1cfb)

  • Add monochrome icon. Implemented by @daywalk3r666 in #99 (72fff0f5)

  • Add workflow_dispatch and cron schedule for "00:15 on 1st of every 2nd month" to github_action_build workflow triggers. (222cab3a)

  • ! Change sha256sums filename to checksums-sha256.txt that is generated for APKs built and uploaded to GitHub releases/actions with GitHub actions and log checksum file contents. This is done so that the checksums gets stored internally in GitHub action logs as well and if APK/checksum files attached to GitHub releases are modified manually by someone, this can be detected, at least until logs expire. (fa85579c)

 

 

Changed

  • Rename TermuxWidgetActivity to TermuxWidgetMainActivity. The TermuxWidgetLauncherActivity activity alias has been added for TermuxWidgetMainActivity. This will allow disabling the launcher activity, but still allow the main activity to be launched from Termux app (by running am start com.termux.widget/com.termux.widget.activities.TermuxWidgetMainActivity) or from widget title in future. The launcher activity will also now be allowed to be enabled again without having to reinstall the app with the Enable Launcher Icon button in the main activity if its currently disabled. (639483ad, d4cfdb2c)

  • Refactor TermuxCreateShortcutActivity to move shortcut functions to ShortcutFile and change shortcut path behaviour.

    The ShortcutFile will now store the path instead of the file object.

    This commit will also now pass absolute path of shortcuts when creating intents for shortcuts and widgets instead of canonical path. This will allow path expansion to be done during execution instead of at creation and if underlying symlink destination changes, new destination will be executed. There will still be a security check during execution to check if shortcut is under allowed directories. The shortcut label will now also be generated from absolute path instead of canonical path as mentioned in #59.

    Co-authored-by: Fabian Thomas fabian@fabianthomas.de.
    Co-authored-by: agnostic-apollo agnosticapollo@gmail.com.

    (b67203aa)

  • Change the word reload to refresh when refreshing widgets to be consistent. (a19b8edd)

  • ! Add -app suffix to app name and add version name in APKs generated. (96c5d1e4)

  • ! Use dot . as tags separator instead of dash - for github release source and debug build type in the apk version tag. This is done to be consistent with semver build metadata tags. For example github-debug will now be github.debug. (07cef6c3)

  • ! Rename app/build.gradle environmental variables to TERMUX_WIDGET_APP__BUILD__ scope instead of TERMUX_WIDGET_.

    • Renamed TERMUX_WIDGET_APP_VERSION_NAME to TERMUX_WIDGET_APP__BUILD__APP_VERSION_NAME.
    • Renamed TERMUX_WIDGET_APK_VERSION_TAG to TERMUX_WIDGET_APP__BUILD__APK_VERSION_TAG.

    (a1b0b196, a5708419)

  • Remove termux-emulator JNI libs from APK. (750f981e)

  • Update suggested permissions for .shortcuts/icons. Implemented by @SuspectTyrannosaurus in #69. (a5e1f43b)

 

 

Fixed

  • Show Open Termux:Widget app to refresh widget message instead of No files in ~/.shortcuts/ message when initial layout of widget is being shown so that it is not confused with shortcuts directory being empty.

    In this stuck state which may happen after app updates or if app process gets killed without being restarted by Android, the widgets must be refreshed by starting the Termux:Widget app or with the refresh button in the main activity.

    If the widget was successfully refreshed/updated and shortcuts directory was empty, only then the No files in ~/.shortcuts/ message will be shown.

    (de8c1a63)

  • Fix issue where app main activity will be brought to front if it existed in recent apps stack and a shortcut was run from launcher. (03c9cb77)

  • Remove replacement of '-' to ' ' in file names. (ad155a6c)

 

Check Installation for more info on termux-widget_<version>+github-debug.apk files attached.

v0.13.0

23 Sep 18:55
Compare
Choose a tag to compare

0.13.0 - 2021-09-23

Changelog

Added

  • Add support for launching scripts from Device Control Menu in power menu on Android 11. Implemented in #55. (8c034da)

  • Use ShortcutManager APIs to create pinned shortcut on android version >=8. This is better way to create shortcuts since launcher does not get access to shortcut data of the app and android itself stores them. It may even solve problems on some launchers, mainly Samsung launcher where randomly all shortcuts get renamed to the app name, considering it will be queuering android for the shortcut names at startup. The only issue with this is that shortcuts may have an app badge on the icon as well, depending on launcher. This is likely a safety mechanism to know which app created the shortcut in case a malicious app creates shortcuts with icons of a different app. This is not controlled by termux-widget but the launcher itself, so contact launcher devs for an option to remove them. For android version < 8, static shortcuts will still be used since pinned shortcuts are not supported. For more info on shortcut types, check https://github.com/agnostic-apollo/TaskerLauncherShortcut#shortcut-types. Related issue #28. (e94d777)

  • Provide a way to refresh widget shortcuts list from Termux terminal/scripts with the com.termux.widget.ACTION_REFRESH_WIDGET intent. Check README.md for details. (15b3698)

  • Add logging system based on Logger class. Log levels can be changed in termux-app settings. (32f344e)

  • Add crash handler so that crash notifications can be shown in termux-app at startup. (32f344e)

  • Add launcher icon/activity that can optionally be disabled. Related issue #56. (7c7612a)

Changed

  • Remove all hardcoded com.termux constants and use the values defined by TermuxConstants and TermuxPreferenceConstants in termux-shared library. (32f344e)

  • !Move to semantic versioning for app version and add commit hash and github to APK file names. (af8b7c1)

  • !Remove token.xml SharedPreferences management and use the one in termux-shared provided by TermuxWidgetAppSharedPreferences. This will invalidate all previous user shortcuts and they will have to be created again. This is necessary due to various reasons including design changes added in this commit and for usage of android's internal ShortcutManager APIs to create pinned shortcut added in e94d777. (32f344e)

  • !Do not show files as shortcuts that are broken symlinks or their canonical path is not under the ~/.shortcuts or ~/.termux directory and do not allow execution for the later. (32f344e, 13954b8, bcb0ab6)

  • Remove duplicated code and handle sending execution intent in the single function TermuxWidgetProvider.sendExecutionIntentToTermuxService(), which will also do proper validation of termux app access and shortcut file. (32f344e)

  • Update naming convention of resources. (32f344e)

  • Enable minifyEnabled but still keep shrinkResources and obfuscation disabled for testing reproducible builds and maintaining stacktraces of crashes. (e0c248d)

Fixed

  • Do not use files as icons that are non-regular files, are broken symlinks or their canonical path is not under the ~/.shortcuts/icons or ~/.termux directory. (9df1ab7, bcb0ab6)

  • Attempt to fix shortcuts token not being saved to SharedPreferences file with termux/termux-app@4f66786b. Related issue #16. (da4b437)

Check Installation for more info on termux-widget_<version>+github-debug.apk files attached.

v0.12

29 Jul 21:16
Compare
Choose a tag to compare

0.12 - 2021-07-30

Added

  • Add ability to have custom icons for shortcuts. Users can create the /data/data/com.termux/files/home/.shortcuts/icons directory with mkdir -p ~/.shortcuts/icons and add a file named <script_name>.png that should be used as the icon when a launcher shortcut is created. For example a script named test.sh should have the icon file named test.sh.png. The directory is shared for both foreground and background tasks. Added by @AbdullahM0hamed in #43. (1287072)

  • Automatically attach debug APKs when a release is created. (7870600)

v0.11

04 Aug 23:18
Compare
Choose a tag to compare
  • Use a natural sort order of number, to e.g. get 1,2,10 instead of 1,10,2 (#25).
  • Put task notification toast at top of screen to avoid blocking toasts shown from termux-toast #33).

v0.10

11 Jan 20:34
Compare
Choose a tag to compare
  • Update icon.
  • Fix name of widget and shortcut.

v0.9

12 Nov 21:44
Compare
Choose a tag to compare
  • Updated version to force new F-Droid build. The last release failed to build on F-Droid due to gradle 4.3 support not being ready at the time.

v0.8

01 Nov 22:12
Compare
Choose a tag to compare
  • Fix Android 8 compatibility.

v0.7

27 Dec 23:22
Compare
Choose a tag to compare
  • Update app icon.

v0.6

20 Nov 16:09
Compare
Choose a tag to compare
  • Add support for folders inside ~/.shortcuts/ when creating single shortcuts.
  • Tweak how nested folders are shown to save vertical space.
  • Add support for launching background tasks without a terminal: A script in a folder named tasks will now be executed in the background without starting a terminal. NOTE: This requires updating the main Termux app to v0.43, which will be released shortly.

v0.5

26 Oct 21:55
Compare
Choose a tag to compare
  • Fix Android 7 incompatibility with single shortcuts.