Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why app process ends when granted permission removed from app settings?

Device: Samsung Galaxy A12

Android Version: 12

I encountered a strange behavior. I said strange because this my first experience about that. Maybe i am missing something. Please all you guys share your experiences, thoughts or suggestions.

This is what i have just come across:

  1. Give storage permission (read/write) in app.
  2. Push device home button and app goes background.
  3. Go to app settings and remove the granted permission.
  4. Logcat says that PROCESS ENDED
  5. Go back to the app from recent apps.
  6. A short splash appears and then the last page appears.
  7. Guess what, everything recreates, viewModel variables set to default.. etc..

Before, when i tested apps with this scenario the app process never ended. Now, is this an official core Android OS choice or a device-specific behavior?

like image 872
charman Avatar asked Sep 07 '25 08:09

charman


1 Answers

is this an official core Android OS choice

Yes.

Before, when i tested apps with this scenario the app process never ended"

I do not know how you tested before, but the behavior you described has existed since the introduction of runtime permissions with Android 6.0, approximately 8 years ago.

like image 136
CommonsWare Avatar answered Sep 10 '25 12:09

CommonsWare