Why Are These Permissions Being Refused

Why are these permissions being refused?

Android permissions are separated to four groups:

- Regular

- Dangerous

- System or Signed

- Signed

Permissions in the first two groups can be granted to any application.

The last two can be obtained only by applications which are system - preinstalled in the device's firmware or which are signed with the "platform key", i.e. the same key that was used to sign the firmware.

Playstore - App getting rejected due to 'android.permission.READ_CALL_LOG'

Your app can not declare READ_CALL_LOG permission in Manifest unless it was a dialer app.

If you feel, your app's major functionality depends on READ_CALL_LOG permission, you must fill the declaration form explaining why you need this permission.

If your request is accepted, your app will be allowed to use the permission.

Permission request flutter app after denial

I have always managed my permissions using two statuses granted and limited (used only for iOS14+). These two permissions are the only truethy statuses. All the others are falsey statuses.

the permission_handler package handles a lot of logic for you already. Before it makes the request, it will check the status to see if it is already defined. If it is, then it will return the status. If the permission has never been requested, then it will request the permission.

Personally, I set up a generic method for a permission request, to keep things DRY.

Future<bool> requestPermission(Permission setting) async {
// setting.request() will return the status ALWAYS
// if setting is already requested, it will return the status
final _result = await setting.request();
switch (_result) {
case PermissionStatus.granted:
case PermissionStatus.limited:
return true;
case PermissionStatus.denied:
case PermissionStatus.restricted:
case PermissionStatus.permanentlyDenied:
return false;
}
}

I then make a request like

final canUseStorage = await requestPermission(Permission.storage);

if (canUseStorage) {
// do something with storage
}

If you have UI that is dependent on a status from Permission, then you still call Permission.storage.status.

[EDIT]

At the moment, you can't track how many times the request pop-up has been shown via permission_handler. It only returns the status. You would need to take the user to the settings depending on the returned status value.

Side Note

Instead of taking the user directly to the settings. Maybe you show a pop up saying "Looks like we don't have permission...", with a button that the user can tap to go to the settings, provides the user with some context as to why they need to go to their settings. And it's also a better user experience!

What happened when deny android app' s permission in system settings

When your app is alive. if you revoke permission from the settings page. The app process will be recreated. it will go to the exact screen where you are before the app gets killed. but viewmodel and all objects would be null at this point.
Refer:
Crash when disable permission and go back to the app



Related Topics



Leave a reply



Submit