Android tutorial - Android Wifi - android app development - android studio - android development tutorial
Learn android - android tutorial - Android wifi - android examples - android programs
What is Wifi ?
- Wi-Fi is the name of a popular wireless networking technology that uses radio waves to provide wireless high-speed Internet and network connections. A common misconception is that the term Wi-Fi is short for "wireless fidelity," however this is not the case.
- Wi-Fi networks have no physical wired connection between sender and receiver by using radio frequency (RF ) technology a frequency within the electromagnetic spectrum associated with radio wave propagation.
- When an RF current is supplied to an antenna, an electromagnetic field is created that then is able to propagate through space.
- The android.net.wifi.WifiManager class can be used to manage the wifi connectivity. It can be used to add network, disable network, scan for access points, disconnect etc.
Android wifi example to enable and disable wifi
- Let's see the simple example of wifi to enable and disable the wifi service.
- File: activity_main.xml
- File: MainActivity.java
Add Permission in AndroidManifest.xml
- You need to add following permissions in AndroidManifest.xml file.