Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-26 Thread Donal Rafferty
Thanks again Kostya, One final thing (well final for now, I'll probably run into more problems after testing) I was wondering what method you chose to convert the RSSI to a percentage? I have been reading up on it and found the formula that uses RSSI_MAX value but I'm unsure of the max RSSI

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-18 Thread Donal Rafferty
Thanks Kostya, I think I'm nearly there. My current problem is adding a new configured access point. I have it hard coded in my code as follows: --- WifiConfiguration wc = new WifiConfiguration(); wc.SSID = ''+scanResult.SSID+''; wc.status =

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-18 Thread Kostya Vasilyev
Donald, Yes, obviously it's possible - Android's built-it UI for connection management does it somehow :) In my program, I do it like this: http://kmansoft.wordpress.com/2010/04/08/adding-wifi-networks-to-known-list/ -- Kostya Vasilev -- WiFi Manager + pretty widget -

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-18 Thread Donal Rafferty
Very good tutorial there, thanks. One thing missing though is how you decide whether a scan result is an open netowrk or one using WEP or WPA/WPA2? Do you have to use scanResult.describeContents() or scanResult.capabilities in some way to determine which type of network to add? 2010/5/18

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-18 Thread Kostya Vasilyev
Donal, It's in scanResult.capabilites, and it's a pretty self-explanatory string. describeCapabilities is inhertied from Parcelable and has to do with persistence. -- Kostya 18.05.2010 12:48, Donal Rafferty пишет: Very good tutorial there, thanks. One thing missing though is how you

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-14 Thread Donal Rafferty
Thanks for that Kostya I have come across a bit of a problem though. After a scan there are 11 AP's found and all 11 show up in the list in the Wifi settings on the device. But when I use

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-14 Thread Kostya Vasilyev
Donal, I think you are not matching the SSIDs of known and live networks correctly. The SSIDs in the known list are enclosed in double quotes: http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html#SSID The SSIDs in the live scan result list are as is, without the

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-14 Thread Donal Rafferty
Thanks again Kostya, I have downloaded your app and had a look, its very nice, the widget will come in very handy for my testing! I was aware of the known versus as is quotes. My problem is for my app to work I need it to scan for AP's when the device is on the move. So it should scan, find a

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-14 Thread Kostya Vasilyev
Donald, Yes, your algorithm is correct. Only add network from the scan list to the known list if not already there. As for scanning on the move, take a look at wake locks. 14 мая, 2010 5:35 PM пользователь Donal Rafferty draf...@gmail.com написал: Thanks again Kostya, I have downloaded your

[android-developers] How to scan Access Points and select strongest signal?

2010-05-13 Thread draf...@gmail.com
I am currently trying to write a class in Android that will Scan for access points, calculate which access point has the best signal and then connect to that access point. So the application will be able to scan on the move and attach to new access points on the go. I have the scanning and

Re: [android-developers] How to scan Access Points and select strongest signal?

2010-05-13 Thread Kostya Vasilyev
Hi, 1. Regarding duplicates. Android maintains a list of known networks - for each, it stores the SSID, encryption configuration, along with the password, if necessary. Each known network also has a unique numeric ID. You can only connect to networks on this known list, because, as you correctly