Android的模拟低的网络连接网络、Android

由网友(相思为墨)分享简介:我想测试我的应用程序为低的网络连接情况。除了站在电梯里,什么是做到这一点的最好方法是什么?我已经试过包装我的手机在铝箔上,但它并没有多大帮助。我需要测试它在真实设备上,而不是在一个模拟器。解决方案 您可以使用模拟器这一点。看看这个页面: Android模拟器。注意接下来的两个参数:-netdelay<延迟&G...

我想测试我的应用程序为低的网络连接情况。除了站在电梯里,什么是做到这一点的最好方法是什么?我已经试过包装我的手机在铝箔上,但它并没有多大帮助。 我需要测试它在真实设备上,而不是在一个模拟器。

解决方案

您可以使用模拟器这一点。看看这个页面: Android模拟器。注意接下来的两个参数:

-netdelay<延迟>

  

设置网络延迟仿真。默认值是无。看到   该表中的网络延迟仿真所支持的值。

-netspeed<速度>

  

设置网络速度仿真。默认值是满的。看到   该表中的网络速度模拟为支持的值。

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 aluminium foil, but it didn't help much. I need to test it on a real device, not in an emulator.

解决方案 Android Studio 安卓模拟器无法连接网络

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.

阅读全文

相关推荐

最新文章