Hello All,

           Here is what I do to scan on wifi while connected to 3G.

WifiLock wifiLock =
wifiService.createWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY,
"MyLock");

        if(!wifiLock.isHeld()){
            wifiLock.acquire();
        }

        if(wifiService.isWifiEnabled() == false){
             wifiService.setWifiEnabled(true);
         }

Is my usage of WIFI_MODE_SCAN_ONLY is correct. When I enable Wifi,
it automatically connects to the remembered network. I just want
to scan but not connect. The definition of WIFI_MODE_SCAN_ONLY is:
In this Wi-Fi lock mode, Wi-Fi will be kept active, but the only
operation that will be supported is initiation of scans, and the
subsequent reporting of scan results.

Please help me

Regards,
Seema

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to