Listen for incoming messages from android-notifier and pass them to a notification application
C
Pull request Compare This branch is 6 commits ahead, 40 commits behind pbrisbin:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
Makefile
README.md
android-receiver.c
config.mk

README.md

Android Receiver

Description

Listen for broadcast messages from android-notifer coming over a specific port. Parse the message, format it, and hand it off to a handler function.

This was done mostly as a learning exercise in C.

Usage

android-receiver &

Setup

Two constants are defined at the top of android-receiver.c:

  • PORTNO is the port number to listen on (10600 is android-notifier's default)
  • HANLDER will be executed with the formatted message passed as the first argument when one is receieved.

You can find the dzen2 handler I'm using in my scripts repo. You could also write your own wrapper around gnome-dbus, notify-osd, etc.

My machine is setup to block TCP broadcast packets as per Arch's "Simple stately firewall". Rather than change this setting, I've elected to setup the notifier app on my phone to send a UDP packet to a specific IP address instead.

That is what this program expects.