Android App doesn't require any special access

2019-07-11 03:30发布

问题:

When I start to install myapp.apk, I get the below screen.

My app requires Location, External Storage permission. Above permissions are supposed to be requested from user as required i.e. just before the code which required these permissions.

Now , when app is installed I get a screen which say App doesn't require any special access as in the screen below. Why?

This is my permission code in Manifest file.

<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.previders.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

回答1:

With Android 6.0, was introduced the new Android permissions runtime control. Shortly: on older devices all permissions were provided on install of app, from Android M needed permission is used only on runtime, when it is really needed, like Camera activity.



回答2:

Are you overwriting app? This scenario happens when you already have app installed and installing same app or same app with new version.

If you don't have any new permission added in new app then it will show like that.



回答3:

As Jadav Lalit already said:

  • if you install an app it will ask for the permissions it needs. This is also the case for installing, uninstalling and re-installing an app.
  • if you reinstall or install a newer version of the app without new permissions, it will not ask for any permissions.

On a side note, if you only need Location and External Storage permission you should only have ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, READ_EXTERNAL_STORAGE and maybe WRITE_EXTERNAL_STORAGE.

You could also add ACCESS_LOCATION_EXTRA_COMMANDS since you use location.

Anyhow a complete list is here: https://developer.android.com/reference/android/Manifest.permission.html They are all there and up to date, but the description can be a little short sometimes. A more descriptive list is here: http://androidpermissions.com/ but seems a little out of date updated.