tags:

views:

73

answers:

1

I am building an application reading the signal strength of each available Wifi access point.

I've written code like:

    wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);

    // Get WiFi status
    WifiInfo info = wifi.getConnectionInfo();
    textStatus.append("\n\nWiFi Status: " + info.toString());

    // List available networks
    List<WifiConfiguration> configs = wifi.getConfiguredNetworks();

However, I have two problems:

  1. In debugging, configs only contains one connection. However, I can see that there are several APs available in the system's wifi setting. I.e. configs is an incomplete list.

  2. I don't know how to get the signal strength in WifiConfiguration.

btw, I am using HTC Hero and Android 1.5.

A: 

Google Markana's Wifi Android tutorial. It is at marakana.com

Anil
If you are referring to http://marakana.com/forums/android/examples/40.html , it does not contain anything about signal strength.
Lars D
@Lars D. Yes it does. WifiManager.compareSignalLevel(). Signal strength is in dbM and is relative. Don't down-vote in ignorance.
Anil