This sample code checks whether the android device is connected to Internet and if it is connected to internet, it is connected to Wifi or Not? MAKE SURE YOU ADD BELOW PERMISSION TO THE ANDROID MANIFEST
Hello all.. This is a simple code snippet to enable WI-FI in android programatically in android. Note : Make sure to add the permissions in the manifest file. These are the permissions. Please leave your valuable comments on this post.
The WifiManager can be used to enable and disable wifi. Where ‘enabled’ is a boolean.