Broadcast Intent when network state has changend

Update: please use this instead: https://stackoverflow.com/a/2677519/241869


There isn't anything exactly like what you are describing but you can use ConnectivityManager.CONNECTIVITY_ACTION to monitor changes and use the extras that come with it to see if the connection has changed from GSM to Wifi and vice versa. For this you need the permission android.permission.ACCESS_NETWORK_STATE and android.permission.ACCESS_WIFI_STATE for checking wifi information.