---
title: "Emulator(1)GCM Account and GPS"
author: "sillycat"
date: "2013-03-29T04:57:06Z"
tags: []
categories: ["移动开发"]
slug: "emulator-1-gcm-account-and-gps"
draft: false
lastmod: "2013-03-29T04:57:06Z"
id: 1838431
url: "https://sillycat.iteye.com/blog/1838431"
---

Emulator(1)GCM Account and GPS 1. Update the GPS information on Emulator &gt;telnet localhost 5554 &gt;geo fix -97.837142 30.233014 Or I can open the DDMS ---&gt; Emulator Control to change that. It seems that the command is better. 2. How to find the latitude and longitude in google map Find the place on google map, and then click right button ----&gt; Choose 'What's here' The google map system will show your the latitude and longitude on the input box. 3. GUI tool from Open Source Project Download the source codes from a red hat server: &gt;hg clone https://code.google.com/p/android-gps-emulator/ Since I am using MAC PRO, I download the directory to my local machine with these commands. &gt;scp -r server.com:/home/chengdu/luohua/android-gps-emulator ./ Move the directory to working place &gt;mv android-gps-emulator /Users/carl/work/android/UI1/ &gt;mvn clean install &gt;mvn gwt:run This tool is useful, but I notice that I may change it a little. I may rebuild the UI part. 4. Useful part to communicate with Telnet SSH Terminal in JAVA http://javassh.org/space/start Notice that here is one new pom.xml configuration format com.google.gwt.google-apis gwt-maps 1.1.0 system ${basedir}/lib/gwt-maps-1.1.0.jar We can put the jar package on the location driver. The pom.xml works for me should be: de.mud jta 2.6 The codes are very simple if we want to use that. package com.sillycat.easyrestserver.application; import java.io.IOException; import de.mud.telnet.TelnetWrapper; public class TelnetAppTest { publicstaticvoid main(String\[] args) throws IOException { TelnetWrapper telnet = new TelnetWrapper(); telnet.connect("localhost", 5554); //telnet.send("geo fix " + longitude + " " + latitude); telnet.send("help"); telnet.disconnect(); } } 5. It seems that the emulator do receive the push message. References: https://code.google.com/p/android-gps-emulator/ http://stackoverflow.com/questions/2279647/how-to-emulate-gps-location-in-the-android-emulator