How to minimize the reduction of compatibiliade due to the use of permissions?

Asked

Viewed 418 times

2

In my new version when putting these permissions in Manifest, I had a reduction of compatibility with various devices, would have some way to check this or who does not have support for these permissions will be left out even?

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  • I believe the big reduction was because of android.permission.WRITE_EXTERNAL_STORAGE, because not all devices have external storage, but I may be mistaken... I could test up an apk without that permission just to see if that’s the cause of the problem?

  • I withdrew and gave in the same, but removing the "ACCESS_FINE_LOCATION" worked. is permission is because of the ad lib, and agr? :/

  • Can’t replace the ACCESS_FINE_LOCATION for ACCESS_COARSE_LOCATION?

  • yeah, I’ll have to check with the ADS support.

  • even using ACCESS_COARSE_LOCATION, I have a loss of 132 compatible devices, which is already better than before(941) rs.

1 answer

1


One of the reasons for this problem is that your app requires GPS (ACCESS_FINE_LOCATION), to have access to location accurately. That is, if a device does not have GPS, it is deleted from the compatibility list.

One solution is to use ACCESS_COARSE_LOCATION, which gets the location over the network. This shape is less accurate, but it works for some applications (I don’t know if this is your case).

Another way is to add in your AndroidManifest.xml the following:

<uses-feature android:name="android.hardware.location" android:required="false" />

Or:

<uses-feature android:name="android.hardware.location.gps" android:required="false" />

This informs that even your app needing GPS, you treat the situation for cases where there is not. Then, devices without GPS can install your app.


Another detail that limits a lot of compatibility is the minimum version of Android (android:minSdkVersion) required to run the app. If the minimum version is too recent, you will probably delete many devices from the compatibility list.

For example, if the minimum version is API 14, Android 4.0, you can achieve until 90.4% of devices.

Reference of 12/2014.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.