Simulate low network connectivity for 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.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 ∞ ∞
Simulate slow network on Android simulator
The emulator lets you simulate various network conditions. You can approximate the network speed for different network protocols, or you can specify Full, which transfers data as quickly as your computer allows.
Specifying a network protocol is always slower than Full. You can also specify the voice and data network status, such as roaming. The defaults are set in the AVD.
Select a Network type:
- GSM - Global System for Mobile Communications
- HSCSD - High-Speed Circuit-Switched Data
- GPRS - Generic Packet Radio Service
- EDGE - Enhanced Data rates for GSM Evolution
- UMTS - Universal Mobile Telecommunications System
- HSPDA - High-Speed Downlink Packet Access
- Full (default)
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 ∞ ∞
Select a Voice status, Data status, or both:
- Home (default)
- Roaming
- Searching
- Denied (emergency calls only)
- Unregistered (off)
For more information see https://developer.android.com/studio/run/emulator.html#extended
Simulate low network connectivity for 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.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 ∞ ∞
Simulate Slow Internet Connection on a REAL device?
In one of your comments you mentioned that you have a DD-WRT router, which is really a tiny Linux box. So you may be able to get a way with the tc command:
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate 512kbit allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 195.96.96.97 flowid 1:1
Simulate low bandwidth in android
I solved the problem by slowing down the network of my PC with network simulator. Then I created a virtual wifi with win 7 and connected my phone with it.
How to limit speed of internet connection on Android emulator?
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:
- Open menu Tools -> Android -> AVD Manager
- Select/create your emulator avd image, click Edit
- Click Show Advanced Settings button
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 ∞ ∞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)
Related Topics
What's Oncreate(Bundle Savedinstancestate)
Setting Drawable Folder to Use for Different Resolutions
How to Change a Layer-List Drawable
How to Get Current Flavor in Gradle
How to Disable Displaying "Suggestions" on the Soft Keyboard
How Do Mpandroidchart Renderers Work and How to Write a Custom Renderer
Android Gradle Apache Httpclient Does Not Exist
How to Create Socket Connection in Android
In Android Edittext, How to Force Writing Uppercase
Check If Correct Google Play Service Available: "Unfortunately Application Has Stopped Working"
How to Add Buttons at Top of Map Fragment API V2 Layout
Manually Put Files to Android Emulator Sd Card
Android - Getting Audio to Play Through Earpiece
Activity Layout: Fragment Class: VS Android:Name Attributes
Android Java Lang Runtimeexception Fail to Connect to Camera Service
How to Add to My Android Application a Button Than Do Like to a Facebook Page
Launch Android Application Without Main Activity and Start Service on Launching Application