Access point signal level updating

by Doughy » Wed, 17 Dec 2008 07:11:53 GMT


Sponsored Links
 I'm writing an application that requires that I check the signal
levels of all access points in the vicinity.  I am using the
WifiManager as follows:

WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE);
boolean scanResult = wm.startScan();
String totalString = "";
List<ScanResult> scan = wm.getScanResults();

In the documentation, it states the following about startScan():
"public boolean startScan()
Request a scan for access points. Returns immediately. The
availability of the results is made known later by means of an
asynchronous event sent on completion of the scan."

Can anyone describe for me the process that occurs when startScan() is
called?  I'm particularly interested in how the signal levels are
calculated.  For example, say I am interested in the signal level for
access point "AP1."  Will the signal level for this be available every
time I call startScan, or does it rely a beacon coming from AP1?  Is
there a way for me to get close to continuous updates of the signal
levels for each access point, or will there always be a large delay in
the update?

If I'm not making sense, let me know and I'll clarify.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Help: service auto restarts on breakpoint when debugging a service

I am trying to run the sample soft keyboard included in the SDK. I am
using the de{*filter*}, and the literature says that to use a breakpoint
while debugging a SERVICE, I need to include:

android.os.Debug.waitForDe{*filter*}();

So here is the portion of the code I modified:

@Override public void onCreate() {
                                                             /* now let's
wait until the de{*filter*} attaches */
       android.os.Debug.waitForDe{*filter*}();

 
super.onCreate();                                                               
                         //
breakpoint 1
        mWordSeparators =
getResources().getString(R.string.word_separators);       //
breakpoint 2
    }

I have put a couple of breakpoints, at the statements indicated by the
comments.

This is what happens: the de{*filter*} first stops at the breakpoint1, for
a few seconds. But then the service restarts. For the life of me I
can't figure out what makes the service to restart.

Any ideas?

Thanks.

-- 

2. CTS API Demos test case

Hi,

While executing CTS  testNumberOfItemsInListView is failing.

The test case is in ApiDemosReferenceTest
TestPackage
android.apidemos.cts.ApiDemosTest
Testcase
 testNumberOfItemsInListView

Looks like the test harness is not pushing a ApiDemos.apk
ApiDemosReferenceTest.apk. files to the device, before executing the
test and recording the result.

When these apk files are manually installed (installed through adb on
to the device) these test case are passing.

Can we manually install these apk and run the test case?



-- 

3. Audiotrack buffer issues?

4. Android Developer, San Francisco, C

5. Seach suggestions with MatrixCursor no longer work in 2.2

6. Cannot get Level-List Drawable to work in ListAdapter

7. How do you handle a pound sign (#) in a string?