Re: [android-developers] Re: Scan for wifi networks when connected to 3G

2011-04-22 Thread Kostya Vasilyev
Well, you could disable all the "known" (configured) WiFi networks using WifiManager. It's not really user friendly, though. 23.04.2011 2:30 пользователь "seema" написал: > Hi, > > I even tried the wifi locks also. This is what I did > > wifiLock = wifiService.createWifiLock(WifiManager.WIFI_MOD

[android-developers] Re: Scan for wifi networks when connected to 3G

2011-04-22 Thread seema
Hi, I even tried the wifi locks also. This is what I did wifiLock = wifiService.createWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY, "MyLock"); if(!wifiLock.isHeld()){ wifiLock.acquire(); } if(wifiService.isWifiEnabled() == false){ wifiService.setWifiE

[android-developers] Re: Scan for wifi networks when connected to 3G

2011-04-22 Thread seema
Hi, I just came across the WiFi locks. It says that I can create a lock with scan_only mode and it will prevent me from automatic connection. But it did not work for me. This is what I did wifiLock = wifiService.createWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY, "MyLock"); if(!wifiLock.i

[android-developers] Re: Scan for wifi networks when connected to 3G

2011-04-22 Thread Igor Prilepov
Short answer: yes, you can do this. First you start scanning WiFi using intent filter WifiManager.SCAN_RESULTS_AVAILABLE_ACTION, then get results, analyse them and only then select which network to connect to. However, as you have found already, if you enabled WiFi and there is a "remembered" ne

[android-developers] Re: Scan for wifi networks when connected to 3G

2011-04-21 Thread Zsolt Vasvari
My guess is that you cannot do this and for good reason. I would be pretty pissed, as a user, if some app pervented me to connect to my WIFI network at home. On Apr 22, 2:18 pm, seema wrote: > Hi, > >      I am developing an app where I would like to know the available Wi-Fi > networks when conn