To let your application to access networks and GPS, you have to enable it in Android Emulator.
Start Android Emulator, press
MENU key in Home Screen, and Click
Settings.

Select
Location & security.

Enable
Use wireless networks and
Use GPS satellites