Hi Guest

HomePage

1 1

To improves our performance please Like Share Subscribe(Will boost us)

Name the API which is used to manage all aspects of WIFI connectivity with syntax?
Question Posted on 11 Aug 2021

Home >> Android >> Android Interview Questions >> Name the API which is used to manage all aspects of WIFI connectivity with syntax?

Name the API which is used to manage all aspects of WIFI connectivity with syntax?
Name of WIFI API is WiFiManager which is used to manage all the aspects of WiFi connectivity. And to instantiate this class we used method name is getSystemService. And syntax is given below:-


WifiManager Wifiobjmain;
Wifiobjmain = (WifiManager) getSystemService(Context.WIFI_SERVICE);


And to get the scan list of wirless networks we need to register our broadcastReceiver. And to register we use registerReceiver method with argument of our receiver class object. And syntax for this is given below:-


class WifiScanReceiver extends BroadcastReceiver
{
 public void onReceive(Context c, Intent intent)
 {
 }
}
WifiScanReceiver wifiRecieverobj = new WifiScanReceiver();
registerReceiver(wifiRecieverobj, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));



And to start above scan we use startScan method of WifiManager class. And this method returns a list of ScanResult objects. And to access this object we use get method. ANd systax for that is given below:-


List< ScanResult> wifiScanList = mainWifiObj.getScanResults();
String data = wifiScanList.get(0).toString();
0
0



Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions
Can we change the name of any application after its deployment in Android?
What is DDMS and its features?
Code to call another activity in Android?
What is Android and used for
What is Open Handset Alliance (OHA)






Most Visited Questions
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |
     
 
Privacy policy | Terms and Conditions | Blog


If the copyright of any questions or content or syntax belong to you email us we will remove that(info@crackyourinterview.com or crackyourinterview2018@gmail.com)
 

1
Home About Us GroupChat
 
Sitemap Feedback Contact us