Android – Best Way to Request Permissions in 2025 (Kotlin Guide)

Modern Android apps often need user permissions like location, storage, camera, or notifications. But requesting permissions the wrong way can confuse users, hurt UX, or even get your app rejected from the Play Store.

In this 2025 guide, you’ll learn the best, recommended, and user-friendly way to request runtime permissions in Android using Kotlin, with practical code examples, UI tips, and current best practices.


🔍 Why Do We Need Permissions?

Permissions protect user privacy. Starting from Android 6.0 (API 23), permissions must be requested at runtime for certain “dangerous” operations like:

  • Camera
  • Location
  • Contacts
  • Notifications
  • Storage (from Android 10+ it’s scoped)

🔐 Permission Types

TypeExamplesRequest Method
NormalInternet, BluetoothAutomatically granted
DangerousLocation, Camera, StorageRequest at runtime
SpecialDraw over apps, Notification ListenerRequires manual settings navigation

🛠️ Dependencies & Setup

No third-party libraries needed! But if you prefer Jetpack APIs:

📲 Step-by-Step: Request Permissions in Kotlin

✅ Step 1: Declare in AndroidManifest.xml

✅ Step 2: Register Permission Request Launcher (Recommended)

In your Activity or Fragment:

✅ Step 3: Check and Request Permission

🧠 What is shouldShowRequestPermissionRationale()?

This shows a custom explanation dialog before the system permission dialog, especially if users previously denied it.

🔄 Handling Denied Permissions Permanently

If the user selects “Don’t ask again”, you should direct them to app settings.

📱 Multiple Permissions Example

⚠️ 2025 Permission Changes and Best Practices

Android VersionChanges
Android 13+Precise vs Approximate Location, Notification permission
Android 14+Foreground + Background permission must be separate
Android 15 (Preview)Runtime Media Access per file (in testing)

🧑‍💻 UX Tips for Better Permission Handling

  • 🔹 Ask only when needed (not at launch)
  • 🔹 Explain why you need the permission
  • 🔹 Avoid multiple popups at once
  • 🔹 Always handle denial gracefully
  • 🔹 Use MaterialDialogs or Jetpack Compose for modern UI

✅ Full Kotlin Example (Single Permission)

✅ Full Kotlin Code – Request Multiple Permissions (Camera + Location)

📋 Required in AndroidManifest.xml

🧠 Notes

  • You can extend this example for more permissions like RECORD_AUDIO, READ_CONTACTS, etc.
  • If using Approximate vs Precise Location on Android 12+, you may need to handle both.
  • Always explain why you need permissions (especially on first launch or after denial).

✅ Most Important Android Permissions (2025 Edition)

🔹 1. CAMERA

  • Use: Taking photos, scanning QR codes, live video.
  • Runtime Permission? ✅ Yes.
  • Best Practice: Explain clearly in UI before requesting.

🔹 2. ACCESS_FINE_LOCATION / ACCESS_COARSE_LOCATION

  • Use: Maps, nearby services, GPS tracking.
  • Runtime Permission? ✅ Yes.
  • Important: Fine = Precise, Coarse = Approximate (Android 12+).
  • Policy: You must declare a strong use case or your app can be rejected.

🔹 3. READ_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE

  • Use: Reading user files (images, music, videos).
  • Runtime Permission? ✅ Yes (before Android 10).
  • Important:
    • Deprecated in Android 13+.
    • Use MediaStore, Storage Access Framework, or Scoped Storage instead.

🔹 4. RECORD_AUDIO

  • Use: Voice recording, voice input, real-time chat.
  • Runtime Permission? ✅ Yes.
  • Policy: Apps that use it in the background need special permission.

🔹 5. READ_CONTACTS / WRITE_CONTACTS

  • Use: Access or update user contacts.
  • Runtime Permission? ✅ Yes.
  • Warning: High risk of privacy concerns; Google may reject apps without justification.

🔹 6. POST_NOTIFICATIONS (Android 13+)

  • Use: To show push/local notifications.
  • Runtime Permission? ✅ Yes (Android 13+).
  • Best Practice: Ask permission only when needed (e.g. after first notification-worthy action).

🔹 7. BLUETOOTH_CONNECT, BLUETOOTH_SCAN (Android 12+)

  • Use: Bluetooth devices, BLE beacons, headphones.
  • Runtime Permission? ✅ Yes.
  • Tip: These replaced older Bluetooth permissions in newer Android versions.

🔹 8. SCHEDULE_EXACT_ALARM

  • Use: Alarm apps, medication reminders, etc.
  • Runtime Permission? ❌ No runtime dialog, but strict policy from Google.
  • Policy: Must justify use in Play Store listing.

🔹 9. FOREGROUND_SERVICE

  • Use: Running background tasks like music playback or GPS.
  • Runtime Permission? ❌ No.
  • Important: Foreground services require persistent notifications.

🔹 10. PACKAGE_USAGE_STATS

  • Use: Battery analyzers, app usage tracking.
  • Runtime Permission? ✅ Yes (special access settings).
  • Warning: Needs user to manually enable in Usage Access settings.

🛡️ Best Practices for Permission Handling

  • Request at runtime only when the feature is used.
  • 📝 Explain the reason to users before the system prompt.
  • ⚙️ Handle “Don’t ask again” by showing a settings redirect dialog.
  • 📱 Use Google Play Console Declaration Form for sensitive permissions.
  • Never ask for unnecessary permissions — it hurts trust and Play Store approval.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top