From 1294dde18348975a323437316e519682f0ca24be Mon Sep 17 00:00:00 2001
From: Joe Fernandez
- Note: If your app targets Android 5.0 (API level 21) or - higher, you must also declare that your app uses the +
+ Caution: If your app targets Android 5.0 (API level 21) or
+ higher, you must declare that your app uses the
android.hardware.location.network or
android.hardware.location.gps hardware feature in the manifest
file, depending on whether your app receives location updates from {@link
android.location.LocationManager#NETWORK_PROVIDER} or from {@link
android.location.LocationManager#GPS_PROVIDER}. If your app receives location
- information from both of these providers, you need to declare that the app
- uses both android.hardware.location.network and
- android.hardware.location.gps.
+ information from either of these location provider sources, you need to
+ declare that the app uses these hardware features in your app manifest.
+ On devices running verions prior to Android 5.0 (API 21), requesting the
+ {@code ACCESS_FINE_LOCATION} or {@code ACCESS_COARSE_LOCATION} permission
+ includes an implied request for location hardware features. However,
+ requesting those permissions does not automatically request location
+ hardware features on Android 5.0 (API level 21) and higher.
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd index 8478940d8f1a..e43ac6118a47 100755 --- a/docs/html/guide/topics/manifest/uses-feature-element.jd +++ b/docs/html/guide/topics/manifest/uses-feature-element.jd @@ -1685,13 +1685,13 @@ densities: '160'
<uses-feature android:name="android.hardware.camera" android:required="false" />-
- Note: If your app targets Android 5.0 (API level 21) or +
+ Caution: If your app targets Android 5.0 (API level 21) or
higher and uses the ACCESS_COARSE_LOCATION or
ACCESS_FINE_LOCATION permission in order to receive location
updates from the network or a GPS, respectively, you must also explicitly
declare that your app uses the android.hardware.location.network
- or android.hardware.location.gps hardware feature, respectively.
+ or android.hardware.location.gps hardware features.
@@ -1750,8 +1750,8 @@ densities: '160'
android.hardware.location
- android.hardware.location.network (Target API level 20 or
- lower only.)
+ android.hardware.location.network
+ (Only when target API level is 20 orlower.)
android.hardware.location
- android.hardware.location.gps (Target API level 20 or lower
- only.)
+ android.hardware.location.gps
+ (Only when target API level is 20 orlower.)
Location Permission - If your application tags images - with GPS location information, you must request the "fine location" + with GPS location information, you must request the {@code ACCESS_FINE_LOCATION} permission. Note that, if your app targets Android 5.0 (API level 21) or higher, you also need to declare that your app uses the device's GPS:
-- cgit v1.2.3-59-g8ed1b