JacksOnF1re
JacksOnF1re

Reputation: 3512

Android 6.0 - What is the difference between dangerous and special permissions?

As the guide from google states out, there are normal, dangerous and special permissions.

Dangerous are, as far as I understand, disabled as default (is this true?).

If an app declares that it needs a dangerous permission, the user has to explicitly grant the permission to the app.

Does this infect also updates or only new installs?

And what exactly is the difference between the dangerous permission and the special permissions?

Android says for special permissions:

Special Permissions There are a couple of permissions that don't behave like normal and dangerous permissions. SYSTEM_ALERT_WINDOW and WRITE_SETTINGS are particularly sensitive, so most apps should not use them. If an app needs one of these permissions, it must declare the permission in the manifest, and send an intent requesting the user's authorization. The system responds to the intent by showing a detailed management screen to the user.

Is that not the same like the quote above? I do not get the difference. Thanks!

Upvotes: 5

Views: 2259

Answers (2)

NarenderNishad
NarenderNishad

Reputation: 1068

System permissions are divided into two categories, normal and dangerous:

  1. Normal permissions do not directly risk the user's privacy. If your app lists a normal permission in its manifest, the system grants the permission automatically.

  2. Dangerous permissions can give the app access to the user's confidential data. If your app lists a normal permission in its manifest, the system grants the permission automatically. If you list a dangerous permission, the user has to explicitly give approval to your app.

Ques : Dangerous are, as far as I understand, disabled as default (is this true?). Ans : Yes Dangerous permissions will be disabled by default.

Ques : Does this infect also updates or only new installs? Ans : There are Two cases

Case 1 : App Targeting & running on API Level 23

If your app is targeting API Level 23, then all the permission which are defined in the Android Manifest will now ask for a permission when they need it.

For example, instead of giving an app access to your camera when you install it, you’ll be prompted the first time the app wants to access your camera.

Case 2 : App Designed for Older Version

Older Android apps automatically get these permissions when you install them, but you can revoke any permission you want from Settings >> Apps >> App >>App Info >> Permissions.

http://developer.android.com/training/permissions/requesting.html

Upvotes: 2

Warpzit
Warpzit

Reputation: 28152

Dangerous

Basically Google decided to mark some permissions dangerous (see full list here). Those permissions need to be requested actively if you want to use them, so you can't just put them in the manifest and expect everything to work, it wont. But if the user gives access once, you can use that permission for the remainder of the applications life (unless the user goes in and clicks it off inside settings).

The request will open a dialog on top of your app where the user can decide if you are allowed the permission.

Special

Special are like dangerous, except even harder to use. In order to use special you have to start an intent requesting the permission so the user goes to a Google defined activity that manages everything.

This is how it works for apps targeting Android 6.0 and onward.

Upvotes: 1

Related Questions