-
Notifications
You must be signed in to change notification settings - Fork 498
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
CB-14260: (android) captureImage permission denial on android 8.1 #95
Conversation
Hi, who's taking care of this? Is it possible to have a feedback? |
What exactly does this PR do? The JIRA ticket talks about a permission problem, but the PR seems to a) fix a bug with a wrong permission and b) add some image rotating for some reason? Did I misunderstand? Is this all related? |
Hi @janpio |
Thanks, now it makes sense ;) What was PS: Go for it with the other PR. The sooner it is there, the sooner it can be merged. |
Well, I noticed that the "android.provider.MediaStore.ACTION_IMAGE_CAPTURE" intent uses the EXTRA_OUTPUT extra (https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT) and therefore WRITE_EXTERNAL_STORAGE is required to save the image. |
As you suggested I created another PR (#100) for the image rotation issue. |
I don't really know Android, could you explain
Is this a new feature added to the plugin, and this code wasn't updated to keep pace? |
The EXTRA_OUTPUT was already there: The "multiple images" feature is part of the plugin, I did not change anything about it. |
Yes, I understand that. |
Here we have the answer: https://developer.android.com/about/versions/oreo/android-8.0-changes#rmp |
Ok, that makes sense. Let me try to recap what is happening here: Correct? |
Yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have my approval then.
Can we merge this? It fixes a critical issue, and it has been quite a few days since it was approved. |
I won't as I don't know enough about possible side effects. If you tested the PR and can confirm that it works, please also approve the PR. Each "vote" helps a future maintainer to decide if to merge or not. |
Works like a charm, tested on brand new Samsung Galaxy S9. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested on xiaomi redmi 4a, works like a charm
@janpio so both @mnill and I tested, and this is insanely critical - the plugin is not working at all for specific target SDKs. Furthermore, per default, it is not working in Ionic because of this. How many tests and approvals will it need before we merge it? I can get a few friends to help as well maybe. |
We still need a Cordova maintainer to merge it and cut a release. Commenting here won't do a thing about that. I requested reviews from 2 people that maybe could help, but they don't seem to have the time right now. As we are all volunteers, this is total understandable. Alternatively you can just install this branch of this PR or fork the plugin yourself and merge this branch into it. |
This doesn't need a certain number of "tests and approvals", it just needs to be verified by some core contributor that can merge, so instead of getting friends saying "it works", what you can do to accelerate the process is to provide a sample app where the bug can be easily reproduced so it's easier for whoever test this. |
I'm pretty sure the audio recording still needs the read permission, so I think it might be safer to ask for both, at least in captureAudio, or just don't change it there and change only for captureImage. |
@mcelotti do you have any idea of why the tests are failing? I have not been able to find the reason. |
Probably unrelated to this specific PR as it is happening with other PRs and commits as well @ffMathy. |
@ffMathy @janpio I agree, it seems that the failed test (only safari is failing: https://travis-ci.org/apache/cordova-plugin-media-capture/builds/413520949) is not directly related to this PR. |
@mcelotti can you fix @jcesarmobile's latest comments so it's ready again? |
Oh, and one more question... The two reviewers remaining are very(!) rarely active on GitHub. Are they both required to approve and/or merge? |
Besides this being not true, none of the requested reviewers need to approve the PR to be merged. It just needs any Apache Cordova maintainer to pull the trigger. |
Should we create a new issue for that then? Because or else no one will probably fix it, and no PRs will ever be merged in that state. |
Of course, feel free to create an issue, investigate, create a PR for it. Anything that moves stuff forward is helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge despite the test errors as it's not related
Thank you so much for being pragmatic about it! |
How frequently are releases performed? |
Last one was in April, so not very frequent |
Who is responsible for the release? Can we speed it up somehow? |
captureImage: permission denial on android 8.1
Platforms affected
Android
What does this PR do?
It fixes this issue: https://issues.apache.org/jira/browse/CB-14260
What testing has been done on this change?
Real device and emulator
Checklist