Based on your question, I share this information that Google sent on September 20 regarding the use of android.hardware.location.gps
(I translate the original email):
From: Google Play Date: 2016-09-20
1:38 PM GMT-05: 00 Subject: Google Play change to Android
ACCESS_FINE_LOCATION permissions
Action required: If your application requires GPS hardware to operate
properly, you need explicitly to add
"android.hardware.location.gps"
uses-feature
to your file
Manifest.xml
.
In the future, these applications will be available to install on
devices that do not have GPS hardware. In most cases
this will not be a problem since Wi-Fi and ID based on
location provides a high fidelity that is sufficient for the
Typical operation of these applications.
However, none of the applications that require GPS hardware,
such as GPS navigators, they must explicitly add the
"android.hardware.location.gps"
uses-feature
to your file
Manifest.xml
.
If your application requires GPS to work properly and you do not include android.hardware.location.gps
in the declaration of your manifest.xml
, your users may experience a poor experience in the application.
Based on the information, you get that if you have defined a targetSdkVersion
in your Manifest.xml
or build.gradle
(remember that build.gradle
overwrite the properties) defined as 21 or greater:
android:targetSdkVersion=21
to use:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
but has not specified:
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
This type of applications can be installed on devices that do not have GPS. that is, specifying that the gps hardware may not be required in the Manifest.xml
, will not be necessary in the future, this will help to avoid filtering certain devices in the playstore for your application, which do not have this hardware , but if your application really uses it, you need to declare it in the manifest.xml so that it works properly.
About the use of android.hardware.location.network
and android.hardware.location.gps
.
If your application has a targetSdkVersion
defined as 21 or later:
android:targetSdkVersion=21
You must declare that your application uses android.hardware.location.network
or android.hardware.location.gps
.
This is if you are using any of the providers NETWORK_PROVIDER ( android.hardware.location.network
) or GPS_PROVIDER ( android.hardware.location.gps
)
example:
<manifest ... >
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
...
<!-- Se necesita si tu aplicación tiene target 5.0 (API 21) o posterior. -->
<uses-feature android:name="android.hardware.location.network" />
<uses-feature android:name="android.hardware.location.gps" />
...
</manifest>