Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
720 views
in Technique[技术] by (71.8m points)

performance - How to limit speed of internet connection on Android emulator?

I need to test app for work with slow internet connection. How to simulate slow internet connection on Android emulator?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For Android Studio projects you can do the following:

If you need to change net speed temporarily, then on an emulator toolbar, click three dots (settings), go to Cellular tab and configure the network speed there. You need to have a recent Android Tools.

If you want to set this speed permanently for some emulator image:

  1. Open menu Tools -> Android -> AVD Manager
  2. Select/create your emulator avd image, click Edit
  3. Click Show Advanced Settings button
  4. Set the desired net speed

    Speeds for reference in increasing 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           ∞          ∞
    
  5. Re-launch the emulator

OLD ANSWER (obsolete)

If you are working in Eclipse, go to Run->Run Configurations, select your run configuration and then go to "Target" Tab. There you will find a "Network Speed" combobox (under the "Emulator Launch Parameters" section).

If you are running emulator from command line, then you can use "-netspeed" cmd line parameter (run emulator -help-netspeed for overview of possible options)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...