Code example for WifiManager

Methods: getConfiguredNetworks

0
                    protected Void doInBackground(Void... voids) { 
                        final WifiManager wifiManager 
                                = (WifiManager) getSystemService 
                                    (Context.WIFI_SERVICE); 
 
                        final List<WifiConfiguration> configurations 
                                = wifiManager.getConfiguredNetworks(); 
 
                        runOnUiThread(new Runnable() { 
                            @Override 
                            public void run() { 
                                if (configurations.size() == 0) { 
                                    AlertDialog.Builder builder = new AlertDialog 
                                            .Builder(WifiEraserActivity.this); 
 
                                    builder.setMessage(getString(R.string 
                                            .zero_configuration)) 
                                           .setCancelable(true) 
                                           .setPositiveButton(getString(R 
                                                   .string.OK), 
                                                   new DialogInterface.OnClickListener() {