模拟Android的低网络连接 [英] Simulate low network connectivity for Android
问题描述
我想测试我的应用程序是否存在网络连接低的情况.除了站在电梯里,最好的方法是什么?我曾尝试用铝箔纸包裹手机,但并没有太大帮助.
I would like to test my application for cases of low network connectivity. Except standing in the elevator, what is the best way to do this? I've tried wrapping my phone in an aluminum foil, but it didn't help much.
我需要在真实的设备上而不是在模拟器上对其进行测试.
I need to test it on a real device, not in an emulator.
推荐答案
您可以为此使用模拟器.看一下此页面: Android仿真器.请注意以下两个参数:
You can use emulator for this. Take a look at this page: Android Emulator. Pay attention to next two arguments:
-
-netdelay <delay>
将网络延迟仿真设置为.默认值为无.看 网络延迟仿真中的表以获取支持的值.
Set network latency emulation to . Default value is none. See the table in Network Delay Emulation for supported values.
-netspeed <speed>
将网络速度仿真设置为.默认值已满.看 网络速度仿真"中的表以获取受支持的值.
Set network speed emulation to . Default value is full. See the table in Network Speed Emulation for supported values.
参考速度以kbps递增:
UP DOWN
-------- ----------
gsm GSM/CSD 14.4 14.4
hscsd HSCSD 14.4 57.6
gprs GPRS 28.8 57.6
umts UMTS/3G 384.0 384.0
edge EDGE/EGPRS 473.6 473.6
hsdpa HSDPA 5760.0 13,980.0
lte LTE 58,000.0 173,000.0
evdo EVDO 75,000.0 280,000.0
full No limit ∞ ∞
这篇关于模拟Android的低网络连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!