title: Update the location of a Circle according to GPS coordinates in a View
body: <p>Here is my Player class</p>
  
  <pre><code>public class Player {
  private double xCor;
  private double yCor;
  
  public Player(double xCor, double yCor)
  {
      this.xCor = xCor;
      this.yCor = yCor;
  }
  
  
  public void setX(double latitude)
  {
      this.xCor = latitude;
  }
  
  public void setY(double longitude)
  {
      this.yCor = longitude;
  }
  
  public double getX()
  {
      return xCor;
  
  }
  
  public double getY()
  {
      return xCor;
  }
  
  
  
  }
  </code></pre>
  
  <p>Here is my GameSurface</p>
  
  <pre><code>public class GameSurface extends View implements Runnable{
  private ArrayList&lt;Ghost&gt; ghostList;
  private Paint paint;
  private Player pl;
  private LocationManager lm;
  private MyLocationListener ml;
  
  public GameSurface(Context context, AttributeSet attrs, int defStyleAttr) {
      super(context, attrs, defStyleAttr);
      init();
      pl = new Player(300,300);
      lm = (LocationManager)     context.getSystemService((Context.LOCATION_SERVICE));
      ml = new MyLocationListener();
  }
  
  public GameSurface(Context context, AttributeSet attrs) {
      super(context, attrs);
      init();
      pl = new Player(300,300);
      lm = (LocationManager) context.getSystemService((Context.LOCATION_SERVICE));
      ml = new MyLocationListener();
  }
  
  public GameSurface(Context context) {
      super(context);
      init();
      pl = new Player(300,300);
      lm = (LocationManager) context.getSystemService((Context.LOCATION_SERVICE));
      ml = new MyLocationListener();
  
  }
  
  public void init() {
      paint = new Paint();
      paint.setColor(0xff00ff00);
      paint.setStyle(Style.STROKE);
      paint.setStrokeWidth(3);
  }
  
  public Player getPlayer()
  {
      return pl;
  }
  
  @Override
  public void onDraw(Canvas c) {
      super.onDraw(c);
      c.drawCircle((float) pl.getX(), (float) pl.getY(),20,paint);
      postDelayed(this, 16);
  }
  
  
  @Override
  public void run() {
      lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0, ml);
      pl.setX(ml.latitude*10);
      pl.setY(ml.longitude*10);
      invalidate();
  }
  
  
  }
  </code></pre>
  
  <p>And here is MyLocationListener</p>
  
  <pre><code>public class MyLocationListener implements LocationListener {
  public double latitude;
  public double longitude;
  
  @Override
  public void onLocationChanged(Location location) {
      latitude = location.getLatitude();
      longitude = location.getLongitude();
  }
  
  @Override
  public void onStatusChanged(String provider, int status, Bundle extras) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void onProviderEnabled(String provider) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void onProviderDisabled(String provider) {
      // TODO Auto-generated method stub
  
  }
  
  }
  </code></pre>
  
  <p>When I hold my device and try to move physically, the circle would not move accordingly. Is there anything wrong with my implementation of LocationListener?</p>