FTMapLocationListener.java :  » Location » friendtracker » atila » android » friendtracker » Android Open Source

Android Open Source » Location » friendtracker 
friendtracker » atila » android » friendtracker » FTMapLocationListener.java
/*
 * FriendTracker
 * Copyright (c) 2009 Juan Gomez Mosquera
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. Or you can get a 
 * copy here: <http://www.gnu.org/licenses/>.
 */

package atila.android.friendtracker;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import atila.android.friendtracker.app.G;

import com.google.android.maps.MapActivity;

public class FTMapLocationListener implements LocationListener 
{
  FTMapActivity m_Parent;
  
  public FTMapLocationListener(MapActivity parent)
  {
    m_Parent = (FTMapActivity)parent;
  }

  public void onLocationChanged(Location location) 
  {
    G.g_Control.m_User.m_Position.SetPosition(location);
    m_Parent.UpdateMap();
  }

  public void onProviderDisabled(String provider) 
  {
    m_Parent.UpdateMap();
  }

  public void onProviderEnabled(String provider) 
  {
  }

  public void onStatusChanged(String provider, int status, Bundle extras) 
  {
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.