asynchronous, push, callback, on_event, hooks, waitfor, intents, broadcastreceiver, ....
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
Some years ago Termux amazed the whole world.
Since then, I find that there have not been too disruptive advances, and I have always been waiting for an asynchronous interface to be able to execute scripts associated with events ... Something like:
WHEN event(X) DO: That
All great termux-api are commands. But there isnt a "wait for event X" (calling to OS) to be asynchonous executed while minimice the batery usage (no pull every X seconds).
Usually this kind of program needs to "register" some kind of "callback", that will be called from lower level when event is fired. Typical example the old "bind" TCL/TK command (or tkinter python). About TCL, you could see how "androwish" are developing their 'borg' command integration with android (specially their event subcommand)
https://www.androwish.org/home/wiki?name=Android+facilities
I.e all automation android apps (like automagic) has their first "on event X" to launch a script. With termux, we have the power of almost all linux universe, but we need to interact with the Android system to create programs/scripts that will be launched on specific events.
I can imagine how comunicate with the entire world from my termux code (bash, python, termux-api ...), but I want to do this based on events like:
- WHEN "push three times a smartwatch button" (from gadgetbridge) DO: "tell HomeAssistant to disconnect the home alarm"
- WHEN "changes on telephony-cellinfo" DO: if phone is less than 5 Km to home (due to changing cells) activate next:
- WHEN "change on wifi-scaninfo" DO: if phone is very close to home (less than 50m) tell HA to open the garage doors. - WHEN "cautch broadcast intent like 'nodomain.freeyourgadget.gadgetbridge.FellAsleep' DO: "lauch the atomic bomb with an mqtt message"
Please we need this kind of termux integration with android. I know it is hard, specially with google adding more and more security restrictions on every version, but I think this kind of feature is a "MUST HAVE".
Thanks in advance, and sorry if it is not the project where to open this kind of FR. I think I opened some request somewhere a few years ago.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not identify a file, test, or entry point. Start by reviewing the existing Termux API command integrations and the Android event mechanisms mentioned here; done requires a narrowly scoped event-registration use case with defined triggers, script invocation, battery behavior, and Android-version constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100