Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ScanResult.level value

Tags:

android

Does ScanResult.level (signal level) have a max and min value?

I want to show a wi-fi signal level image, but I have to know if ScanResult.level has a max and min value for matching right image.

Thanks.

like image 921
Okan Kocyigit Avatar asked Jan 02 '12 18:01

Okan Kocyigit


1 Answers

As you can read in the document you linked to, that value is specified in dBm. Designing the mapping between dBm and bars is a more complicated issue than you may think - remember the whole story about iPhone losing signal when being hold in a "wrong" manner? It was mostly just a badly designed dBm-to-bars mapping: http://www.anandtech.com/show/3821/iphone-4-redux-analyzing-apples-ios-41-signal-fix

You can quite safely assume, that this value will range between -10 and -100 dBm (based upon taking a look at WiFi Analyzer app and Wikipedia article about dBm), but you shouldn't use a linear mapping. Take a look at the graphs in the article about iPhone for the idea how it should look.

like image 79
user1234567 Avatar answered Oct 13 '22 23:10

user1234567