Enhancement: When permissions are denied initially nothing happens on mic icon click#76
Enhancement: When permissions are denied initially nothing happens on mic icon click#76kavitamp wants to merge 1 commit intonaXa777:masterfrom
Conversation
…icrophone permission is denied.
naXa777
left a comment
There was a problem hiding this comment.
thank you for your contribution!
after some testing, I see that this solution has a side effect: user is never asked for a permission, even when the app is launched for the first time. tested on Android 12 / Pixel 3.
these 2 dialogs are missing after your changes. this is a regression.
it would be cool if you can implement the following enhanced permissions flow:
- show a permissions dialog. don't redirect to settings.
- if user declined and clicked RECORD button again, show permissions rationale. don't redirect to settings
- if user declined and clicked RECORD button again, don't show dialogs, redirect to settings,
tips:
- read solutions here https://stackoverflow.com/q/30719047/1429387
- I think that you need to make changes in
PermissionsHelper.checkAndRequestPermissionsmethod.
| startRecording(); | ||
| } else { | ||
| Toast.makeText(getActivity(), getString(R.string.error_no_permission_granted_record), Toast.LENGTH_LONG).show(); | ||
| openAppSettings(); |
There was a problem hiding this comment.
This is a handler for the RECORD button. I assume that the PAUSE/RESUME button is affected by the same issue, so it would be good if you apply your fix in both places. Though I didn't test permissions request after click on RESUME button. So not sure. But I suggest you to make changes in PermissionsHelper.checkAndRequestPermissions method, which is invoked after a click on RECORD button as well as a click on RESUME button.


Issue:
When permissions are denied initially nothing happens on mic icon click
Expected behavior:
When permissions are denied initially Open app settings for permissions on the mic-icon click and display a toast with a relevant message.
Description and steps:
When permissions are denied initially, the app should convey a proper message mentioning the reason for not starting the recording and redirect the user to the settings page to enable the permission
Steps:
Issue recording:
Permission-Issue.mp4
Fixed issue recording:
Permission-Issue-Fixed.mp4
Please let me know if you have any feedback.
Thank you!