Sample app from android developer tools, detects the type of network a device is connected too.