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

Conversation

surinder-tsys
Copy link
Collaborator

Pre condition:
App camera permission should not enabled

Step to reproduce:

  1. Launch the app and login
  2. Click on '+' icon and select "Upload from camera", Permission pop will open and click on "Allow". (error message coming).
  3. Again run step 2 to verify permission applied or not.(Now not asking any permission and open camera)

Actual result:
After allow permission applied successfully but error message coming to set permission manually.

Expected result:
Error message should not come if permission set successfully

  • Tests written, or not not needed

@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

@@ -443,6 +443,9 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
// 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.

@alperozturk96
Copy link
Collaborator

@tobiasKaminsky @surinder-tsys I tested with Android 14 emulator. After tap the don't allow, user already not seeing any error message.

android_14.mov

@surinder-tsys surinder-tsys force-pushed the nmc/1941-cameraPermissionRationale branch from 3c4dbb6 to 8822573 Compare October 20, 2023 06:01
@surinder-tsys surinder-tsys force-pushed the nmc/1941-cameraPermissionRationale branch from 8822573 to 7443459 Compare December 27, 2023 15:47
@surinder-tsys surinder-tsys force-pushed the nmc/1941-cameraPermissionRationale branch 2 times, most recently from 0b30011 to 8be45e3 Compare January 11, 2024 09:39
@surinder-tsys surinder-tsys force-pushed the nmc/1941-cameraPermissionRationale branch from 8be45e3 to a1fe95c Compare February 14, 2024 09:13
@surinder-tsys
Copy link
Collaborator Author

This PR is no longer applicable. So closing the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants