Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:55:22+00:00 2026-06-16T01:55:22+00:00

I want to disable a specific wifi connection which is entered by the user.

  • 0

I want to disable a specific wifi connection which is entered by the user.

How to get all the wifi connections of the device and enable/disable the specific one?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:55:23+00:00Added an answer on June 16, 2026 at 1:55 am

    First you should check that whether the wifi of device is enabled or not, if not enable it. Then use WifiManager and getScanResults to get the list of wifi available. Here is a snippet of code, you can use.

     wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
            if (wifi.isWifiEnabled() == false)
            {
                Toast.makeText(getApplicationContext(), "wifi is disabled..making it enabled", Toast.LENGTH_LONG).show();
                wifi.setWifiEnabled(true);
            }   
            this.adapter = new SimpleAdapter(WiFiDemo.this, arraylist, R.layout.row, new String[] { ITEM_KEY }, new int[] { R.id.list_value });
            lv.setAdapter(this.adapter);
    
            registerReceiver(new BroadcastReceiver()
            {
                @Override
                public void onReceive(Context c, Intent intent) 
                {
                   results = wifi.getScanResults();
                   size = results.size();
                }
            }, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));                    
        }
    
        public void onClick(View view) 
        {
            arraylist.clear();          
            wifi.startScan();
    
            Toast.makeText(this, "Scanning...." + size, Toast.LENGTH_SHORT).show();
            try 
            {
                size = size - 1;
                while (size >= 0) 
                {   
                    HashMap<String, String> item = new HashMap<String, String>();                       
                    item.put(ITEM_KEY, results.get(size).SSID + "  " + results.get(size).capabilities);
    
                    arraylist.add(item);
                    size--;
                    adapter.notifyDataSetChanged();                 
                } 
            }
            catch (Exception e)
            { }         
        }
    

    Let me know if it worked or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to disable all Foreign key constraints and re-enable them after, is there
I want to truncate all tables under a specific schema in DB2 which is
I want to enable/disable a checkable item in a QTreeWidget, when a specific signal
I want to disable one specific row in datagrid in following manner: 1) Highlight
I want to disable text selection for specific elements. For example: p { -moz-user-select:
I want to disable the shadow effect on a specific aero window. All I
I want to enable deprecated errors globally but disable them for a specific piece
I want to disable some specific feature that one my plugins does to the
I want to disable a cck field inside a specific form in Drupal 6.
I want to disable directory browsing of /galerias folder and all subdirectories Index of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.