The router runs a simple UDP server written in C. The phone polls this server periodically using SL4A: a Python scripting layer for the Android platform.