Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera permission rationale #11520

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// permission was granted
getFileOperationsHelper().uploadFromCamera(this, FileDisplayActivity.REQUEST_CODE__UPLOAD_FROM_CAMERA);
} else if (!shouldShowRequestPermissionRationale(permissions[0])) {
// user CHECKED "never ask again"
DisplayUtils.showSnackMessage(this, R.string.camera_permission_rationale);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With which Android did you test this?
With Android 10 I only have "allow" or "deny"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check with Android 9.
There is radio button for "Don't ask again".
Screenshot 2023-04-18 100444

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Tested with Android 9 emulator.

Maybe this is vendor specific?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that can might be the case because we have found this issue in Huawei device.
The issue will only occur in devices where there is option to deny the permission by checking "Don't ask again" (for lower os versions) or "Don't allow" (for OS 11+) devices.

In both the cases no error snackbar shown to the user.

For more test you can check on Android 11+ devices and select "Don't allow". And again if you click on camera option then no permission dialog and message will be shown.

}
break;
default:
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@
<string name="version_dev_download">Herunterladen</string>
<string name="video_overlay_icon">Video Überlagerungsicon</string>
<string name="wait_a_moment">Bitte warten…</string>
<string name="camera_permission_rationale">Bitte geben Sie unter Apps &amp; Benachrichtigungen in den Einstellungen manuell die Erlaubnis.</string>
<string name="wait_checking_credentials">Überprüfe gespeicherte Anmeldeinformationen</string>
<string name="wait_for_tmp_copy_from_private_storage">Kopiere Datei von privatem Speicher</string>
<string name="webview_version_check_alert_dialog_message">Bitte aktualisieren Sie die Android System WebView-App für eine Anmeldung</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@
<string name="link_name">Link Name</string>
<string name="delete_link">Delete Link</string>
<string name="share_settings">Settings</string>
<string name="camera_permission_rationale">Please navigate to App info in settings and give permission manually.</string>
<string name="common_confirm">Confirm</string>
<string name="strict_mode">Strict mode: no HTTP connection allowed!</string>
<string name="destination_filename">Destination filename</string>
Expand Down
Loading