7

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.

Tima
  • 12,765
  • 23
  • 82
  • 125

3 Answers3

5

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

Moystard
  • 1,827
  • 2
  • 17
  • 18
  • It works on my emulator. I have no Internet connection at all. – Moystard May 05 '11 at 14:15
  • Probably it's bug http://code.google.com/p/android/issues/detail?id=3838 But why it works for some people?! – Tima May 05 '11 at 14:37
  • Try to delete your simulator instance and to create a new one. – Moystard May 05 '11 at 14:44
  • tried it on another way. Just created a new istance .. and ... it doesn't work. But then i opened the existing 1.5. instance .. there is no connection. And it's for the first time enough for me – Tima May 05 '11 at 14:54
  • and you are really using 2.2-emulator? – Tima May 05 '11 at 14:57
  • [Another way of doing it](https://code.google.com/p/android/issues/detail?id=3838#c15) : `telnet localhost 5554 // Connects to the emulator qemu monitor // Enter in the QEmu functionalities info network // List the network adapter "user.0" is usually the name set_link user.0 down // Shut the network down set_link user.0 up // Re-enable networking` – GoodSp33d May 07 '13 at 15:03
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.

Tima
  • 12,765
  • 23
  • 82
  • 125
0

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

DustinB
  • 11,037
  • 5
  • 46
  • 54