MobDojoStart learning free

Android App Security · Permissions in Depth · Lesson 1 of 5

Runtime Permissions

Protection levels, one-time grants, and permissions that reset or expire.

12 min60 XPFree lab

Three levels of protection

You saw in Mobile Fundamentals that apps ask before touching your location or camera. Under the hood, Android sorts every permission by its protection level, a label that decides how the permission gets handed out.

Prompts are organized by permission group, a set of related permissions shown in one dialog. That's why a prompt says "access your contacts" instead of listing each technical permission name. Google warns developers that groups can change between versions, so groups only shape what you see.

Since Android 11, some prompts offer Only this time, a one-time permission. It exists only for location, the microphone and the camera. The app keeps access while it's on screen and for a short while after you leave it, then loses it and has to ask again next time.

On the simulated phone, TrailSnap is opening for the first time. Answer all three prompts and compare the choices each one gives you.

Permissions that don't last forever

A runtime permission isn't always a permanent decision. Android has several ways of taking access back, or of not handing it out in the first place.

Deny twice and the prompt stops. If you tap Deny for the same permission more than once, Android treats it as "don't ask again." The app can't show the system dialog for it anymore. If you change your mind, you have to switch it on yourself in Settings.

Unused apps get reset. Android 11 added permission auto-reset. If you haven't opened an app for a few months, Android removes the runtime permissions you gave it, as if you'd switched them to Deny. Google later brought this to phones running Android 6 to 10 through Google Play services. From Android 12 the system goes further and puts long-unused apps into hibernation, which also clears their cached files and stops their background jobs and push notifications. Install-time permissions like internet access aren't affected. Opening the app wakes it up, but it has to ask for its permissions again. On Android 13 and newer, the App info page has a switch called Pause app activity if unused if you want to exempt an app.

Notifications became a permission. Before Android 13, any app could send notifications until you turned them off. Android 13 added the POST_NOTIFICATIONS runtime permission, so a newly installed app's notifications start off until you allow them. Apps already on the phone when it updated to Android 13 usually kept theirs.

This matters because notifications are a channel for nagging, fake alerts and scams. A prompt gives you a chance to say no up front.

Hands-on lab

Try it on the simulated phone

Answer real-looking permission prompts from a hiking app and see what you handed over.

Open the lab
Test yourself

Can you answer these?

  1. Which of TrailSnap's prompts gave you no Only this time choice?
  2. You haven't opened a budgeting app in five months, and your phone runs Android 13. What has most likely happened to it?

Answer them in the app to earn 60 XP.

Answer in the app