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

Does this open up an Intent API so other applications can send Termux commands? #6

Closed
rjcorwin opened this issue Jul 27, 2017 · 7 comments
Labels

Comments

@rjcorwin
Copy link

We have an app we would like to be able to send commands to termux. Is there an Intent API for this?

@yut23
Copy link

yut23 commented Aug 11, 2017

It looks like this is built into the main Termux app. See https://github.com/termux/termux-app/blob/master/app/src/main/java/com/termux/app/TermuxService.java#L124.

It's used in https://github.com/termux/termux-tasker/blob/master/app/src/main/java/com/termux/tasker/FireReceiver.java.

EDIT: Nevermind, it's not exported. For future reference, you can still manually run the intent with am if you have root.

@fornwall
Copy link
Member

@rjsteinert Are you still interested in this? As @yut23 says the functionality is there but is not yet exposed, perhaps it could be done by requesting a custom permission?

@rjcorwin
Copy link
Author

@fornwall For the time being we've managed to package up node and dat into an APK thanks to our ability to compile it in Termux and then get it going as a shared library. For the future, I bet I'll run into a case where it would be handy :-)

@zcattacz
Copy link

zcattacz commented Jan 1, 2018

I am using easer https://github.com/renyuneyun/Easer which seems a quite active automation tool . It support dispatching customized intent as action. Is it possible to trigger termux scripts from Easer?

@fagci
Copy link

fagci commented Nov 6, 2018

Use Automagic, Luke

@ghost ghost added the question label Jan 15, 2019
@alensiljak
Copy link

It's a good start. Requires manually adding scripts to ~/.termux/tasker/ and running them through an app that can run Tasker plugins.
It would be even more convenient to invoke the Termux intent directly and hopefully that is also coming at some point. That would eliminate two components from the process - the addon and a third-party app.

@ghost
Copy link

ghost commented Nov 14, 2020

If need the Intent API for executing commands in Termux, check out https://github.com/termux/termux-app/blob/master/app/src/main/java/com/termux/app/RunCommandService.java#L24-L61.

@ghost ghost closed this as completed Nov 14, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants