It seemed to be difficult to determine whether a device was connected to wifi or mobile network or not so I looked at the Android Developer site and found the ConnectivityManager
I couldn't find it anywhere else so here's is a small piece of Reflection code that returns the name of the Current WIFI connection as WIFI, mobile, none etc. Apparently it will return quite a few more which are documented in the above link but I can't test them.
It works on the three I have available.
It also requires the reflection library and a permission to be added to the Manifest:
AddPermission (android.permission.ACCESS_NETWORK_STATE)
The attached file has the code in a small module and creates a msgbox to display the current value.
I hope someone finds this useful.
Tags: Wifi Name Connect
I couldn't find it anywhere else so here's is a small piece of Reflection code that returns the name of the Current WIFI connection as WIFI, mobile, none etc. Apparently it will return quite a few more which are documented in the above link but I can't test them.
It works on the three I have available.
It also requires the reflection library and a permission to be added to the Manifest:
AddPermission (android.permission.ACCESS_NETWORK_STATE)
The attached file has the code in a small module and creates a msgbox to display the current value.
I hope someone finds this useful.
Tags: Wifi Name Connect
Attachments
Last edited: