-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
[BUG] - Crash when camera permission is present in manifest #417
Comments
Not sure how to solve, open for suggestions and/or a PR |
Found out that this behaviour is actually described in the docs too: https://developer.android.com/reference/android/provider/MediaStore#ACTION_IMAGE_CAPTURE 😟 For now we use the workaround to request the camera permission on our side in advance. Not sure if we could do something in the library to at least prevent crashes in this situation. But I think it would be worth to note that circumstance in the readme. What do you think? |
@PhilippNowak96 We can add on the FAQ documentation, could you please drop the PR? Would avoid README since is not this library specific |
Let's keep this mess organised! This issue has been automatically marked as |
…ission in manifest
Sorry for the late answer, was quite busy. I opened a PR with the change in the FAQs :) |
Describe the bug
When having
<uses-permission android:name="android.permission.CAMERA" />
in AndroidManifest and selectCamera
as the source, the app crashes due to missing camera permission.I saw that the permission stuff got removed in 4.0.0 in favor of using ActivityResultContracts (which is awesome actually) but we need that permission for another feature in our app. As soon as you remove the permission from the manifest, selecting camera as source doesn't crash anymore.
Stacktrace
To Reproduce
Steps to reproduce the behavior:
<uses-permission android:name="android.permission.CAMERA" />
to AndroidManifestCropImageContract()
:cropImage.launch(options {})
Expected behavior
Library still uses the new way via ActivityResultContract and just ignores the presence of the camera permission
Smartphone (please complete the following information):
Additional context
If you need a sample project, just ping me again. I can provide one.
The text was updated successfully, but these errors were encountered: