Android background capture (Scenario 2)
Unlike iOS, Android allows background message capture, so you get real on-phone autonomy β just
not for iMessage. A no-build recipe (Tasker or MacroDroid) calls the same shared POST /agent
backend the Mac collector and iOS Shortcut use.
What you need
- The backend reachable from the phone: the HF Space's dedicated-GPU path, a Mac/cloud box, or even
the phone itself (Termux). The free ZeroGPU Space does not serve
/agent(Gradio-SDK only) β use one of the others. - The same
INGEST_TOKENthe backend uses.
Tasker recipe (Notification Access β works for RCS/WhatsApp/SMS notifications)
- Profile β Event β UI β Notification (or Phone β Received Text for SMS). Restrict it to your messaging app(s).
- Task β Net β HTTP Request:
- Method:
POST - URL:
https://<your-backend>/agent - Headers:
Authorization: Bearer <INGEST_TOKEN>andContent-Type: application/json - Body:
(Use the notification text variable your trigger provides for{ "thread": "%evtprm()", "now": "%TIMES", "push_gcal": true }thread;%TIMESβ current time.)
- Method:
- Parse the response (
Variable β JSON Readonplan.events) if you want a confirmation toast/notification; otherwisepush_gcal:truealready created the events in Google Calendar.
MacroDroid is equivalent: Trigger: Notification Received / SMS Received β Action: HTTP POST with the same URL/headers/body.
Notes
- This is genuinely hands-off: the OS delivers the trigger in the background.
- For a fully on-device variant, run the backend + a small model in Termux and point Tasker at
http://127.0.0.1:7860/agent, withINFERENCE_BASE_URLβ a localllama-server(Gemma E4B / a small Hermes). See on-device.md and hermes.md. - A native Kotlin
NotificationListenerServiceapp could replace Tasker for a polished install β a separate effort; the Tasker recipe is the MVP.