Home | History | Annotate | Download | only in facade

Lines Matching refs:location

21 import android.location.Address;
22 import android.location.Geocoder;
23 import android.location.Location;
24 import android.location.LocationListener;
25 import android.location.LocationManager;
46 * Once activated by 'startLocating' the LocationFacade attempts to return location data collected
47 * via GPS or the cell network. If neither are available the last known location may be retrieved.
84 private final Map<String, Location> mLocationUpdates;
90 public synchronized void onLocationChanged(Location location) {
91 mLocationUpdates.put(location.getProvider(), location);
92 Map<String, Location> copy = Maps.newHashMap();
93 for (Entry<String, Location> entry : mLocationUpdates.entrySet()) {
96 mEventFacade.postEvent("location", copy);
118 mLocationUpdates = new HashMap<String, Location>();
133 @RpcParameter(name = "provider", description = "Name of location provider") String provider) {
137 @Rpc(description = "Starts collecting location data.")
138 @RpcStartEvent("location")
148 @Rpc(description = "Returns the current location as indicated by all available providers.", returns = "A map of location information by provider.")
149 public Map<String, Location> readLocation() {
153 @Rpc(description = "Stops collecting location data.")
154 @RpcStopEvent("location")
160 @Rpc(description = "Returns the last known location of the device.", returns = "A map of location information by provider.")
161 public Map<String, Location> getLastKnownLocation() {
162 Map<String, Location> location = new HashMap<String, Location>();
164 location.put(provider, mLocationManager.getLastKnownLocation(provider));
166 return location;