logoalt Hacker News

hagbard_ctoday at 10:13 AM0 repliesview on HN

I recently made a 'notification-driven RPC' app for Android to help me help others:

Notifactor (Android App)

A lightweight native Android app that intercepts notifications on the device and triggers actions based on configurable rules.

The app uses Android's NotificationListenerService API. Once granted notification access it receives a callback for every notification posted on the device. It then checks each notification against configured rules and runs the configured action.

Why would you want this?

I don't know why you would want this but I can tell you why I made it: to make it easier to control some functions on Android devices used by people I often help using them in some way. My mother's Android TV (which I use to communicate with her through Linphone), phone and tablet sometimes stop doing the right thing. I live about 1300 km to the north of where she lives so I can't just hop on my bike to fix things. Thus far I relied on a set of Termux scripts on these devices to keep a reverse ssh tunnel open to an endpoint on my server but this has a number of drawbacks: the tunnel is not always there when I need it due to WiFi dropouts and other similar problems and the constant connection uses battery power on the phone and tablet. If only I could cause the tunnel to be created when I need it and brought down when it is not needed... Well, that is possible using Notifactor by sending a notification on a specific channel (ntfy refers to these as topics) whereupon Notifactor runs a Termux script which manages the tunnel (etc.).