-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/termux controls provider #55
Feature/termux controls provider #55
Conversation
* Add reactivex/reactivestreams dependencies (required) * Add TermuxWidgetControlsProviderService * Add error handling for missing shortcut files
* Route intent through TermuxWidgetControlExecutorReceiver instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private Intent addShortcutFileExtrasToIntent(File file, Intent intent)
Its returning an Intent
but its never used. You are passing the intent as parameter which will automatically get updated, so no need to return.
private void addShortcutFile(File dir, List<File> shortcutFiles, int depth)
Why are you not using dir.listFiles(TermuxWidgetService.SHORTCUT_FILES_FILTER)
? Wouldn't shortcut icons and hidden files be included currently?
Apart from that, good coding! I don't see any other issues related to new changes. I can't test this cause my Android 11
avd
is not showing the 3 dots for me to add the device control in power menu, it seems android revision is old, probably that's the reason.
Also note that in Android 12
device controls have been removed from power menu. Check https://www.reddit.com/r/Android/comments/nx9pd1/android_12_device_controls_removed_from_the_power. No response from google in https://issuetracker.google.com/issues/190662102.
Updated!
Fixed.. Somehow I didn't see that was there :)
This would be a very niche feature then. Hopefully at the very least, Google will allow an option to re-enable it. 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing, will merge.
Implements #54 Device Control Widgets
(This is only for Android 11+)
I have only tested on Google Pixel 5
Execution will exhibit same behavior as current home screen widgets. (i.e. any file placed in
.shortcuts/tasks
will run in background, all others in foreground.termux-dialog
,termux-toast
) it will not be visible until user exits the Device Control view.Error handling if script was removed / changed:
and tapping "Open App" will display error in Termux window: