Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 993 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 993 Bytes

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.