Internet connection in android emulator

江枫思渺然 提交于 2020-01-03 08:43:05

问题


I have no idea, what am i doing wrong

I want to turn off internet connection in emulator (Android 2.2)

I'm pressing F8 -> no effect, i still have internet connection

I turn airplane mode -> no effect, i still have internet connection.

I go to settings for check, airplane mode is on, wifi is off, but there is internet connection on device.

What is wrong?!

Please, don't suggest to turn off internet on my computer. I know, it's the solution for sure, but not the best one

P.s.

It is probably the bug http://code.google.com/p/android/issues/detail?id=3838

I tried to disable connection in emulator for android 1.5 and it works fine there.


回答1:


Open the DDMS perspective under Eclipse and set the denied/unregistered value for the voice and the data




回答2:


It is probably the bug http://code.google.com/p/android/issues/detail?id=3838

I tried to disable connection in emulator for android 1.5 and it works fine there.




回答3:


You can use the emulator console to set emulator speed to 0 (and also delay), but might not be exactly what you are looking for if you want the network to be completely DOWN.

 $ telnet localhost 5554
 network speed 0.01 0.01
 OK
 network delay 1000 1000
 OK
 network status
 Current network status:
   download speed:          10 bits/s (0.0 KB/s)
   upload speed:            10 bits/s (0.0 KB/s)
   minimum latency:  1000 ms
   maximum latency:  1000 ms

This causes most network connections to fail for me (but app still thinks network is UP).



来源:https://stackoverflow.com/questions/5898949/internet-connection-in-android-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!