ILocationManager.aidl revision 48f17518223a2917fd82195004fbb206cb9a05a3
1/* 2 * Copyright (C) 2007, The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.location; 18 19import android.app.PendingIntent; 20import android.location.Address; 21import android.location.IGeocodeProvider; 22import android.location.IGpsStatusListener; 23import android.location.ILocationCollector; 24import android.location.ILocationListener; 25import android.location.ILocationProvider; 26import android.location.Location; 27import android.os.Bundle; 28 29/** 30 * System private API for talking with the location service. 31 * 32 * {@hide} 33 */ 34interface ILocationManager 35{ 36 List getAllProviders(); 37 List getProviders(boolean enabledOnly); 38 39 void requestLocationUpdates(String provider, long minTime, float minDistance, 40 in ILocationListener listener); 41 void requestLocationUpdatesPI(String provider, long minTime, float minDistance, 42 in PendingIntent intent); 43 void removeUpdates(in ILocationListener listener); 44 void removeUpdatesPI(in PendingIntent intent); 45 46 boolean addGpsStatusListener(IGpsStatusListener listener); 47 void removeGpsStatusListener(IGpsStatusListener listener); 48 49 // for reporting callback completion 50 void locationCallbackFinished(ILocationListener listener); 51 52 boolean sendExtraCommand(String provider, String command, inout Bundle extras); 53 54 void addProximityAlert(double latitude, double longitude, float distance, 55 long expiration, in PendingIntent intent); 56 void removeProximityAlert(in PendingIntent intent); 57 58 Bundle getProviderInfo(String provider); 59 boolean isProviderEnabled(String provider); 60 61 Location getLastKnownLocation(String provider); 62 63 /* used by location providers to tell the location manager when it has a new location */ 64 void setLocation(in Location location); 65 66 String getFromLocation(double latitude, double longitude, int maxResults, 67 String language, String country, String variant, String appName, out List<Address> addrs); 68 String getFromLocationName(String locationName, 69 double lowerLeftLatitude, double lowerLeftLongitude, 70 double upperRightLatitude, double upperRightLongitude, int maxResults, 71 String language, String country, String variant, String appName, out List<Address> addrs); 72 73 void addTestProvider(String name, boolean requiresNetwork, boolean requiresSatellite, 74 boolean requiresCell, boolean hasMonetaryCost, boolean supportsAltitude, 75 boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy); 76 void removeTestProvider(String provider); 77 void setTestProviderLocation(String provider, in Location loc); 78 void clearTestProviderLocation(String provider); 79 void setTestProviderEnabled(String provider, boolean enabled); 80 void clearTestProviderEnabled(String provider); 81 void setTestProviderStatus(String provider, int status, in Bundle extras, long updateTime); 82 void clearTestProviderStatus(String provider); 83 84 /* for installing external Location Providers */ 85 void setNetworkLocationProvider(ILocationProvider provider); 86 void setLocationCollector(ILocationCollector collector); 87 void setGeocodeProvider(IGeocodeProvider provider); 88} 89