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. TextView setTextAppearance bugged?


i started developing with a droid a few days ago and noticed some
weird behaviour with the TextView.setTextAppearance function. If i use
it with a attr style parameter, it wont work. But if i put the same
ressource in the constructor, it works.

For example:
// Works

TextViw title = new TextView(context, null,

// Works not
TextView title = new TextView(context);
title.setTextAppearance(context, android.R.attr.textAppearanceLarge);

Am i doing something wrong?

Well in my case, doing it via constructor works fine (as i only need
to set it once) but in some cases where you change want to change it
dynamicly, it could cause some problems.

Any ideas what's wrong?


2. How to compile the open sourced bundled apps

I would like to compile the bundled apps (such as Camera).

I created a new Android project with the code from the Camera project
downloaded from git.  It uses private APIs such as
android.pim.DateFormat so it wouldn't compile.  Now, I pull in the
whole source code for package but this again depends
on a bunch of other packages.

What is the recommended way to compile such project?

3. Hi, please help with installing an .apk

4. What is the intent to launch the image gallery?

5. Browsing G1 from Windows

6. (Another) h/w accelerated OpenGL|ES question

7. service stops when phone goes idle