Android的模拟低的网络连接 [英] android simulate low network connectivity

查看:108
本文介绍了Android的模拟低的网络连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

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

  1. -netdelay<延迟>

      

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

  2. -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.

解决方案

You can use emulator for this. Take a look at this page: Android Emulator. Pay attention to next two arguments:

  1. -netdelay <delay>

    Set network latency emulation to . Default value is none. See the table in Network Delay Emulation for supported values.

  2. -netspeed <speed>

    Set network speed emulation to . Default value is full. See the table in Network Speed Emulation for supported values.

这篇关于Android的模拟低的网络连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆