Skip to content
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

android 11 device control #54

Closed
mirsella opened this issue Aug 28, 2021 · 6 comments
Closed

android 11 device control #54

mirsella opened this issue Aug 28, 2021 · 6 comments
Assignees

Comments

@mirsella
Copy link

Android 11 and up have "device control" which are tiles in the power menu, usually to control connected things like plug and lamps. I think it would be pretty useful to add the .shortcuts to the power menu using the device control api. thanks

https://developer.android.com/guide/topics/ui/device-control

@creepy-pasta101
Copy link

Good idea 👍💡💡

@dkramer95 dkramer95 self-assigned this Aug 28, 2021
@dkramer95
Copy link
Contributor

This sounded interesting! I was able to get a working POC, but will spend some more time to clean it up. Here is a sneak peek of how it could look:

termux-device-control-widget-demo.mov

Unfortunately it looks as though only an Activity can be started (which typically would display in the bottom sheet). So downside is any time you click on a button, it will briefly show that empty bottom sheet animation. I don't think there will be a way around that. But the Activity will quickly close and run whatever shortcut you supplied (just like a regular Termux widget would behave from home screen)

@mirsella
Copy link
Author

waw that was fast ! thank you so much

@mirsella
Copy link
Author

And about the activity if you want to bother, there seems to be ways of making an activity invisible / transparent ? Or it's not possible in this case ? I found multiple thread solved with multiple solution about this.

thank you !

@dkramer95
Copy link
Contributor

I was able to get it working properly w/o that bottom sheet! I have raised a PR

@agnostic-apollo
Copy link
Member

Closed by #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants