最近测试了一下wifi强度值发现一般都是在50~65dBm之间徘徊,到网上查了发现这个值已经是接近完美的了,
我现在迷惑的是机器上显示信息强度是1~4格图标,那这个是怎么根据wifi强度值划分的呢?
我现在迷惑的是机器上显示信息强度是1~4格图标,那这个是怎么根据wifi强度值划分的呢?
解决方案 »
- 在android中怎么实现真正的退出功能???
- 我是来送分的...一个小小的小问题...
- Android怎样得到系统设置的来电提示音
- 使用MonkeyRunner不能运行press
- android 新添加服务,帮忙看看,谢谢~
- android反向定位求教
- 关于模拟按键的问题
- 一个关于pendingIntent的问题。
- 请教各位Project Properties里的Is Library选项是干什么的?
- 大神求救啊,给listview设置一个上下文菜单,然后长按listview后出现的上下文菜单标题上怎么得到关于选中的item的信息
- 如何查看android手机硬件基本信息
- 如何在进入activity的时候选中listView中的某行
中一段代码。 /**
* Calculates the level of the signal. This should be used any time a signal
* is being shown.
*
* @param rssi The power of the signal measured in RSSI.
* @param numLevels The number of levels to consider in the calculated
* level.
* @return A level of the signal, given in the range of 0 to numLevels-1
* (both inclusive).
*/
public static int calculateSignalLevel(int rssi, int numLevels) {
if (rssi <= MIN_RSSI) {
return 0;
} else if (rssi >= MAX_RSSI) {
return numLevels - 1;
} else {
int partitionSize = (MAX_RSSI - MIN_RSSI) / (numLevels - 1);
return (rssi - MIN_RSSI) / partitionSize;
}
}