How do you test GPS applications in Android? Can we test it using the Android emulator?
Yes.
If you develop using the Eclipse ADT plugin, open the DDMS perspective after launching the emulator and look for the Emulator Control view. There is a location controls section that allows you to send fixed latitude and longitude coordinates, or GPX (GPS Exchange Format) or KML (Keyhole Markup Language) files if you want to send multiple coordinates at regular intervals (to simulate traveling a specific route).
Alternatively, you can simply telnet to the emulator and use the geo command from the command line, which supports fixed latitude and longitude coordinates as well as NMEA data sentences:
telnet localhost 5554
geo fix -82.411629 28.054553
geo nmea $GPGGA,001431.092,0118.2653,N,10351.1359,E,0,00,,-19.6,M,4.1,M,,0000*5B