http://stackoverflow.com/questions/10274818/in-android-is-there-a-way-to-use-broadcast-receiver-to-detect-the-switch-betwee http://stackoverflow.com/questions/11086797/broadcast-receiver-not-detecting-lost-wifi-connection