Android

Permissions and Device Features

Runtime permissions, Camera, Location, Sensors, Bluetooth, NFC, Telephony and device feature detection

21 питань зі співбесід·
Mid-Level
1

What is the difference between Normal and Dangerous permissions?

Відповідь

Normal permissions are automatically granted at install time (e.g., INTERNET, VIBRATE). Dangerous permissions require explicit user consent at runtime since Android 6.0 (e.g., CAMERA, LOCATION) because they affect privacy.

2

How to request a runtime permission in Android?

Відповідь

First check with checkSelfPermission(), then request with requestPermissions() or the modern Permission Launcher (registerForActivityResult). Handle the response in onRequestPermissionsResult() or in the launcher callback.

3

What is ActivityCompat.checkSelfPermission() used for?

Відповідь

The checkSelfPermission() method checks whether a permission is currently granted. It returns PERMISSION_GRANTED if granted, PERMISSION_DENIED otherwise. Always check before using a permission‑protected feature.

4

What are permission groups?

5

What is shouldShowRequestPermissionRationale() used for?

+18 питань зі співбесід

Опануй Android для наступної співбесіди

Отримай доступ до всіх питань, flashcards, технічних тестів, вправ code review та симуляторів співбесід.

Почни безкоштовно