Pro Android with Kotlin


Download 5.42 Mb.
Pdf ko'rish
bet94/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   90   91   92   93   94   95   96   97   ...   223
Bog'liq
@de android telegram Pro Android with Kotlin Developing Modern Mobile

104
CHAPTER 7: Permissions

Dangerous: This level corresponds to high-level security-sensitive 
information. The user will be asked whether they want to allow using 
that permission. Once allowed for an app, the allowance will be saved
and the user won’t be asked again until the app gets reinstalled or the 
permission gets explicitly revoked by using the system settings app.

Signature: This level corresponds to extremely high-level security-
sensitive information. Only apps signed with the same certificate 
as the app defining the permission can acquire it. The system will 
check whether the signatures match and then automatically grant 
the permission. This level makes sense only for a collection of apps 
developed by the same developer.

Special: For a couple of use cases, the system grants access to certain 
system resources only by off-band acquisition methods. Namely, for 
permissions SYSTEM_ALERT_WINDOW and WRITE_SETTINGS, you have to 
declare them in the manifest and call special intents to acquire them. 
The intent action you have to use for SYSTEM_ALERT_WINDOW is Settings.
ACTION_MANAGE_OVERLAY_PERMISSION, and the one for WRITE_SETTINGS is 
Settings.ACTION_MANAGE_WRITE_SETTINGS. Your app should use these 
two only if absolutely necessary.

Privileged or System Only: These are for system image apps. You should 
not have to use them.
Permissions are gathered in permission groups. The idea is that once the user has
accepted a permission request from permission A of group G1, another permission inquiry 
for another permission B of the same group G1 is not needed. From a user experience 
perspective, permission groups show an effect only if we are talking about Dangerous type 
permissions; permission groups for Normal permissions have no impact.
Defining Permissions
The Android OS includes a number of permissions defined by various built-in apps or the 
OS itself. In addition, you as a developer can define your own permissions to secure apps or 
Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   90   91   92   93   94   95   96   97   ...   223




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling