Permissions Questions with Answers

14 practice questions on Permissions (Android (Kotlin & Compose)) with answers and step-by-step solutions. Try 10 samples below, then practise all 14 free in the AptiNest app.

Sample questions

Question 1Easy

Since which Android version must dangerous permissions be requested at runtime?

  1. Android 2.3
  2. Android 10 (API 29)
  3. Android 6.0 (API 23)
  4. Android 4.0

Answer: C. Android 6.0 (API 23)

Explanation

Before Marshmallow, all permissions were granted at install time.

Step-by-step solution

  1. Before Android 6.0, all permissions were granted at install.
  2. Android 6.0 Marshmallow (API 23) introduced runtime permissions.
  3. Dangerous permissions are requested while the app is running.

Why the other options are wrong

  • A. Android 2.3 still granted everything at install.
  • B. Android 10 added background location rules, not runtime permissions.
  • D. Android 4.0 had install-time permissions only.

Tip: Runtime permissions = Marshmallow = API 23.

Question 2Easy

Which of these is a runtime (dangerous) permission?

  1. INTERNET
  2. VIBRATE
  3. ACCESS_NETWORK_STATE
  4. CAMERA

Answer: D. CAMERA

Explanation

INTERNET, network-state and vibrate are normal permissions granted at install.

Step-by-step solution

  1. Dangerous permissions protect private data or hardware.
  2. CAMERA gives access to the camera, so it needs runtime approval.
  3. INTERNET, VIBRATE and ACCESS_NETWORK_STATE are normal permissions.

Why the other options are wrong

  • A. INTERNET is a normal permission granted at install.
  • B. VIBRATE is normal; it poses no privacy risk.
  • C. Reading network state is a normal permission.

Tip: Privacy-sensitive hardware or data = dangerous permission.

Question 3Easy

The INTERNET permission in Android is:

  1. A normal permission granted at install
  2. A dangerous permission needing a dialog
  3. Not needed for network calls
  4. Only available to system apps

Answer: A. A normal permission granted at install

Explanation

It must be declared in the manifest but is not requested at runtime.

Step-by-step solution

  1. INTERNET is a normal permission.
  2. Declaring it in the manifest is enough; it is granted at install.
  3. No runtime dialog is shown.

Why the other options are wrong

  • B. It does not trigger a runtime dialog.
  • C. Without it, network calls fail with a security exception.
  • D. Any app can declare it.

Tip: INTERNET: declare it, never ask for it.

Question 4Easy

If the user permanently denies a permission, the app should:

  1. Point the user to settings
  2. Ask again in a loop
  3. Crash deliberately
  4. Hide the app icon

Answer: A. Point the user to settings

Explanation

The system won't show the dialog again, so direct the user to settings if the feature is essential.

Step-by-step solution

  1. After permanent denial, the system no longer shows the permission dialog.
  2. Requesting again just fails silently.
  3. Explain why the feature needs it and offer a button to open the app's Settings page.

Why the other options are wrong

  • B. The dialog will not appear again, and a loop annoys the user.
  • C. Crashing is never acceptable.
  • D. Apps cannot hide their own launcher icon for this purpose.

Tip: Permanently denied -> explain + link to Settings.

Question 5Medium

Since Android 12, when an app requests ACCESS_FINE_LOCATION, the user can choose:

  1. GPS or Wi-Fi hardware
  2. Only allow or crash
  3. City name only
  4. Precise or approximate

Answer: D. Precise or approximate

Explanation

Apps should work gracefully with approximate (coarse) location if the user chooses it.

Step-by-step solution

  1. Since Android 12, the location dialog shows two choices.
  2. The user can grant precise or approximate location.
  3. Apps must handle receiving only approximate (coarse) location.

Why the other options are wrong

  • A. The user does not choose GPS or Wi-Fi hardware.
  • B. Denying does not crash the app; there are several choices.
  • C. There is no 'city name only' option.

Tip: Android 12: precise vs approximate.

Question 6Medium

To let a user pick a photo without requesting storage permissions, a modern app should use:

  1. Root access
  2. The system photo picker
  3. A custom file scanner
  4. READ_EXTERNAL_STORAGE always

Answer: B. The system photo picker

Explanation

The photo picker grants access only to the chosen items.

Step-by-step solution

  1. The system photo picker (PickVisualMedia) lets the user choose specific images.
  2. The app gets access only to what was picked.
  3. No storage permission is needed.

Why the other options are wrong

  • A. Root access is not available on normal phones and is unsafe.
  • C. Scanning files yourself needs broad storage permission.
  • D. READ_EXTERNAL_STORAGE gives broad access and is restricted on newer Android.

Tip: Pick a photo = photo picker, no permission.

Question 7Medium

Which modern API is recommended for requesting a permission from an Activity or composable?

  1. ActivityResultContracts.RequestPermission
  2. Settings.ACTION_SETTINGS
  3. startActivityForResult with a code
  4. onRequestPermissionsResult only

Answer: A. ActivityResultContracts.RequestPermission

Explanation

In Compose use rememberLauncherForActivityResult with that contract.

Step-by-step solution

  1. The Activity Result API replaced the old request-code callbacks.
  2. registerForActivityResult(ActivityResultContracts.RequestPermission()) gives a launcher.
  3. In Compose, rememberLauncherForActivityResult does the same.

Why the other options are wrong

  • B. This opens the Settings app; it does not request a permission.
  • C. startActivityForResult with request codes is the deprecated older approach.
  • D. onRequestPermissionsResult belongs to the old requestPermissions flow.

Tip: Permission in modern code = ActivityResultContracts.RequestPermission.

Question 8Medium

shouldShowRequestPermissionRationale() returns true when:

  1. The device has no camera
  2. The permission is already granted
  3. The user denied it before
  4. The app was just installed and never asked

Answer: C. The user denied it before

Explanation

It signals that an educational UI should explain the benefit before asking again.

Step-by-step solution

  1. The method tells you whether to explain why you need the permission.
  2. It returns true after the user has denied the request at least once (without 'don't ask again').
  3. It returns false on the first request and after permanent denial.

Why the other options are wrong

  • A. It says nothing about hardware.
  • B. If already granted, no rationale is needed, so it returns false.
  • D. Before the first request it returns false.

Tip: Denied once = show rationale.

Question 9Medium

Which check tells you whether a permission is currently granted?

  1. Manifest.hasPermission()
  2. requestPermissions() returning true
  3. checkSelfPermission(...) == PERMISSION_GRANTED
  4. permission.isEnabled()

Answer: C. checkSelfPermission(...) == PERMISSION_GRANTED

Explanation

ContextCompat.checkSelfPermission returns PERMISSION_GRANTED or PERMISSION_DENIED.

Step-by-step solution

  1. ContextCompat.checkSelfPermission(context, permission) returns an int.
  2. Compare it with PackageManager.PERMISSION_GRANTED.
  3. If equal, the permission is granted now.

Why the other options are wrong

  • A. There is no Manifest.hasPermission() method.
  • B. requestPermissions() shows a dialog and returns nothing.
  • D. Permission strings have no isEnabled() method.

Tip: Always check right before using the feature.

Question 10Hard

An app needs location while running in the background on Android 10+. What is required?

  1. No permission at all
  2. Only ACCESS_COARSE_LOCATION at install
  3. Only INTERNET
  4. ACCESS_BACKGROUND_LOCATION too

Answer: D. ACCESS_BACKGROUND_LOCATION too

Explanation

Background location is a separate permission, requested after foreground location is granted.

Step-by-step solution

  1. On Android 10+, foreground location permissions cover use while the app is visible.
  2. Background use needs ACCESS_BACKGROUND_LOCATION as well.
  3. It must be requested separately, after foreground location is granted.

Why the other options are wrong

  • A. Location always needs permission.
  • B. Coarse location alone covers foreground use only.
  • C. INTERNET has nothing to do with location access.

Tip: Background location on Android 10+ = separate permission.

Practise all 14 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Android (Kotlin & Compose) topics · All topics