i have a list off wifi i want when i conected to specific wifi my phone volume auto down how to do this i am new in android
private class WifiScanReceiver extends BroadcastReceiver{
public void onReceive(Context c, Intent intent) {
List<ScanResult> wifiScanList = wifi.getScanResults();
wifis = new String[wifiScanList.size()];
for(int i = 0; i < wifiScanList.size(); i++){
wifis[i] = ((wifiScanList.get(i)).toString());
}
lv.setAdapter(new ArrayAdapter<String>(getApplicationContext(),android.R.layout.simple_list_item_1,wifis));
}
}
here is the code of wifi which show me on list i want when specific wifi is connected my phone auto profile change to silent . thanks in advance