# 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_TOKEN` the backend uses. ## Tasker recipe (Notification Access — works for RCS/WhatsApp/SMS notifications) 1. **Profile → Event → UI → Notification** (or **Phone → Received Text** for SMS). Restrict it to your messaging app(s). 2. **Task → Net → HTTP Request:** - Method: `POST` - URL: `https:///agent` - Headers: `Authorization: Bearer ` and `Content-Type: application/json` - Body: ```json { "thread": "%evtprm()", "now": "%TIMES", "push_gcal": true } ``` (Use the notification text variable your trigger provides for `thread`; `%TIMES` → current time.) 3. **Parse the response** (`Variable → JSON Read` on `plan.events`) if you want a confirmation toast/notification; otherwise `push_gcal:true` already 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`, with `INFERENCE_BASE_URL` → a local `llama-server` (Gemma E4B / a small Hermes). See [on-device.md](./on-device.md) and [hermes.md](./hermes.md). - A native Kotlin `NotificationListenerService` app could replace Tasker for a polished install — a separate effort; the Tasker recipe is the MVP.