Android Emulator 5554

Alternatively, you can use the adb devices command, which prints a list of running emulator instances and their console port numbers. For more information, see Querying for Emulator/Device Instances in the adb documentation.

Note: The emulator listens for connections on ports 5554-5587 and accepts connections only from localhost.

Once you are connected to the console, you can then enter help [command] to see a list of console commands and learn about specific commands.

The geo command supports the subcommands listed in the table below.




fix <longitude> <latitude> [<altitude>]

Send a simple GPS fix to the emulator instance.

Specify longitude and latitude in decimal degrees. Specify altitude in meters.

nmea <sentence>

Send an NMEA 0183 sentence to the emulated device, as if it were sent from an emulated GPS modem.

<sentence> must begin with '$GP'. Only '$GPGGA' and '$GPRCM' sentences are currently supported.

You can issue the geo command to fix the GPS location as soon as an emulator instance is running. The emulator creates a mock location provider that sends it to GPS-aware applications as soon as they start and register location listeners. Any application can query the location manager to obtain the current GPS fix for the emulated device by calling:

Was this article helpful?

0 0

Post a comment