views:

47

answers:

2

Hi,

I would like to test the behavior of my application when the user is in a no-signal zone or when his phone is in flight mode.

-> How do I put an Android Virtual Device into offline mode (where no connection to the internet is possible) ?

I have tried the following:

  • Activating flight mode via the AVD settings: surprisingly, this does NOT work (browsing the internet is still possible in flight mode!)

  • Disabling the network connection on my PC: this obviously works, but is not satisfactory as I need Internet when I am testing my app

A: 

All I do is go into the Window menu, select 'open perspective->other' open the DDMS perspective. Inside the DDMS perspective you have an 'Emulator Control' view where you can adjust latency, roaming, you can give it different telephone and data states. So following this procedure to get the Emulator view, you then go to 'Data' drop down and select the 'Denied' option.

__nv__
This is indeed the kind of control I was looking for. However, it does NOT work either... I set Voice and Data to denied, but I am still am able to browse the internet from the AVD. This definitely looks like a bug in the emulator...
Sebastien
*It works on my box* :) I imagine there may be something else I have set that you do not. When I get a chance I will dig into it and see if I can reproduce it not working... what version of eclipse/avd?
__nv__
A: 

You should just press F8 in emulator window, it toggle off cell networking according to: http://developer.android.com/guide/developing/tools/emulator.html. But I test it and it is not working too! There is only message that there is no internet connection but it actually works...

Jercik