android.location
Class Location

java.lang.Object
  extended by android.location.Location
All Implemented Interfaces:
Parcelable

public class Location
extends Object
implements Parcelable


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
static Parcelable.Creator<Location> CREATOR
           
static int FORMAT_DEGREES
           
static int FORMAT_MINUTES
           
static int FORMAT_SECONDS
           
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
Location(Location l)
           
Location(String provider)
           
 
Method Summary
 float bearingTo(Location dest)
           
static String convert(double coordinate, int outputType)
           
static double convert(String coordinate)
           
 int describeContents()
           
static void distanceBetween(double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results)
           
 float distanceTo(Location dest)
           
 void dump(Printer pw, String prefix)
           
 float getAccuracy()
           
 double getAltitude()
           
 float getBearing()
           
 Bundle getExtras()
           
 double getLatitude()
           
 double getLongitude()
           
 String getProvider()
           
 float getSpeed()
           
 long getTime()
           
 boolean hasAccuracy()
           
 boolean hasAltitude()
           
 boolean hasBearing()
           
 boolean hasSpeed()
           
 void removeAccuracy()
           
 void removeAltitude()
           
 void removeBearing()
           
 void removeSpeed()
           
 void reset()
           
 void set(Location l)
           
 void setAccuracy(float accuracy)
           
 void setAltitude(double altitude)
           
 void setBearing(float bearing)
           
 void setExtras(Bundle extras)
           
 void setLatitude(double latitude)
           
 void setLongitude(double longitude)
           
 void setProvider(String provider)
           
 void setSpeed(float speed)
           
 void setTime(long time)
           
 String toString()
           
 void writeToParcel(Parcel parcel, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_DEGREES

public static final int FORMAT_DEGREES
See Also:
Constant Field Values

FORMAT_MINUTES

public static final int FORMAT_MINUTES
See Also:
Constant Field Values

FORMAT_SECONDS

public static final int FORMAT_SECONDS
See Also:
Constant Field Values

CREATOR

public static final Parcelable.Creator<Location> CREATOR
Constructor Detail

Location

public Location(String provider)

Location

public Location(Location l)
Method Detail

dump

public void dump(Printer pw,
                 String prefix)

set

public void set(Location l)

reset

public void reset()

convert

public static String convert(double coordinate,
                             int outputType)

convert

public static double convert(String coordinate)

distanceBetween

public static void distanceBetween(double startLatitude,
                                   double startLongitude,
                                   double endLatitude,
                                   double endLongitude,
                                   float[] results)

distanceTo

public float distanceTo(Location dest)

bearingTo

public float bearingTo(Location dest)

getProvider

public String getProvider()

setProvider

public void setProvider(String provider)

getTime

public long getTime()

setTime

public void setTime(long time)

getLatitude

public double getLatitude()

setLatitude

public void setLatitude(double latitude)

getLongitude

public double getLongitude()

setLongitude

public void setLongitude(double longitude)

hasAltitude

public boolean hasAltitude()

getAltitude

public double getAltitude()

setAltitude

public void setAltitude(double altitude)

removeAltitude

public void removeAltitude()

hasSpeed

public boolean hasSpeed()

getSpeed

public float getSpeed()

setSpeed

public void setSpeed(float speed)

removeSpeed

public void removeSpeed()

hasBearing

public boolean hasBearing()

getBearing

public float getBearing()

setBearing

public void setBearing(float bearing)

removeBearing

public void removeBearing()

hasAccuracy

public boolean hasAccuracy()

getAccuracy

public float getAccuracy()

setAccuracy

public void setAccuracy(float accuracy)

removeAccuracy

public void removeAccuracy()

getExtras

public Bundle getExtras()

setExtras

public void setExtras(Bundle extras)

toString

public String toString()
Overrides:
toString in class Object

describeContents

public int describeContents()
Specified by:
describeContents in interface Parcelable

writeToParcel

public void writeToParcel(Parcel parcel,
                          int flags)
Specified by:
writeToParcel in interface Parcelable


Copyright © 2008-2012. All Rights Reserved.