I need to detect in android if there is any connection Wifi
or 3G
( or 3G+
) or EDGE
in android. When there is an connection wifi
or 3G
I can send photos to server, and when is only a connection EDGE
to not send them to server.
I saw that wifi connectivity can be detected with ConnectivityManager.TYPE_WIFI
and with ConnectivityManager.TYPE_MOBILE
and TelephonyManager.NETWORK_TYPE_EDGE
can be detected EDGE connection. But how can be detected 3G or 3G+?
https://gist.github.com/emil2k/5130324
How to check whether 3g is active or not in android. Check this link. May help you.
First get a reference to the ConnectivityManager and then check the Wifi and 3G status of the device. You'll need the ACCESS_NETWORK_STATE permission to use this service.