-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2023-10-23] [$500] Android - Grant Camera Permission button not working on first click #27442
Comments
Triggered auto assignment to @kadiealexander ( |
Job added to Upwork: https://www.upwork.com/jobs/~019c4a398f728939bc |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @trjExpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
This may be a duplicate of #26499. |
Yeah, it looks like it. @Julesssss, I'm going to close this but let me know if you disagree. |
No the issue in #26499 was that user always redirected to Settings page and a native modal never for asking permission never open, #26499 was created to fix that. But Work was already in progress to solve this issue in PR #26499, #26499 was a Dupe. The issue here is when the user click on "Grant Permission" it does not work for first time if user has declined the permission request in past. Hope I am clear with my explanation |
Not sure I would call it a regression, as that PR introduced the feature, just in a broken state. But I do agree this is a separate issue. @trjExpensify it's slightly different:
|
Though perhaps both will have the same solution. Here's the most recent plan of action |
Okay, so this would be an eligible bug report. Do you want to hold this issue on #26499 going upstream? |
It's going to be a little bit confusing, but I'd actually say we can work on both in paralell. @ishpaul777 it would be great if you wanted to work on both issues together? Please make a proposal for this one if youre interested. |
Unfortunatley, I am unable to find a satifactory solution for both the issue yet. Will make a proposal once i find a solution. |
@ishpaul777 any luck? |
@Julesssss @trjExpensify Changes -
function persistBlockedPermission(isCameraBlocked: boolean) {
Onyx.merge(ONYXKEYS.PERMISSION_BLOCKED, {
isCameraPermissionBlocked: isCameraBlocked,
});
}
https://github.com/Expensify/App/blob/main/src/pages/iou/ReceiptSelector/index.native.js#L151 const askForPermissions = () => {
// There's no way we can check for the BLOCKED status without requesting the permission first
// https://github.com/zoontek/react-native-permissions/blob/a836e114ce3a180b2b23916292c79841a267d828/README.md?plain=1#L670
if (permissions === RESULTS.BLOCKED || isAndroidBlockedPermissionRef.current) {
Linking.openSettings();
} else if (permissions === RESULTS.DENIED) {
CameraPermission.requestCameraPermission().then((permissionStatus) => {
setPermissions(permissionStatus);
if (permissionStatus !== RESULTS.BLOCKED) {
isAndroidBlockedPermissionRef.current = false;
Receipt.persistBlockedPermission(false);
return;
}
isAndroidBlockedPermissionRef.current = true;
Receipt.persistBlockedPermission(true);
});
}
useEffect(() => {
const subscription = AppState.addEventListener('change', (nextAppState) => {
if (appState.current.match(/inactive|background/) && nextAppState === 'active') {
CameraPermission.getCameraPermissionStatus().then((permissionStatus) => {
setPermissions(permissionStatus);
+ if (permissionStatus === RESULTS.GRANTED) {
+ isAndroidBlockedPermissionRef.current = false;
+ Receipt.persistBlockedPermission(false);
+ }
});
}
....
CameraPermission.getCameraPermissionStatus().then((permissionStatus) => {
setPermissions(permissionStatus);
+ if (permissionStatus === RESULTS.GRANTED) {
+ isAndroidBlockedPermissionRef.current = false;
+ Receipt.persistBlockedPermission(false);
+ }
}); |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-20. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-20. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-23. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-23. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Can be paid out today |
This is also a ux improvement. : ) |
Okay, so keeping these jobs separate for following the audit trail later if needs be. Confirming the payment summary as follows:
No #urgency bonus applied as per here. |
@trjExpensify Sorry, I accepted it. |
Perfect, settled up with everyone. Closing! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Pre Requisite - Make sure camera permission is declined
Expected Result:
Linked to App settings (as request permission is blocked by OS)
Actual Result:
Clicking button does nothing on first click.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.70.2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Record_2023-09-11-22-36-35.mp4
Screen_Recording_20230914_094815_New.Expensify.mp4
Expensify/Expensify Issue URL:
Issue reported by: @ishpaul777
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694451532440139
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: