-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
fixed the bug that Gallery picker option is not showing #53
Conversation
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.
Thanks for the PR! really happy to see more people putting hands on to improve the library
I just worry cause this code was changed in #5 to fix another issue. And we need to be sure we didn't bought this problem back.
Could you point me of the tests/devices/OSs you did?
@ravindu1024 @akkie2016 could take a look and check if the issue returned on this version?
@Canato I have found that Android 11 requires permission to get package info. I've updated the PR that combines the fixes in #5 and the legacy code with permission fixed. The huawei line is removed as getGalleryIntents() always return notEmpty-list. Tested in Android 11(pixel 4) and Android 7(Xperia) |
@kaustubhkp Sorry, I don't have pixel 4 in my hand now. Will try it on weekend. I have added the workaround, could you test if it works. |
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.
Very nice! now is working like a charm for me!
Great add to the library @datdescartes
To merge we just need to polish some bits
1. Please update the CHANGELOG
with
### Fixed
- [Galley option not showing](https://github.com/CanHub/Android-Image-Cropper/issues/20)
- [Camera option not showing](https://github.com/CanHub/Android-Image-Cropper/issues/52)
2. Remove the #20
comments, uncommenting the related code.
CropImage.java
line 156// TODO Issue #20
fragment_main.xml
line 48<!-- Todo Issue #20 -->
and uncomment the codeCropImageViewFragment
line 75// TODO Issue #20
and uncomment the code.
3. Use the CommonVersionCheck
class
- change
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
toCommonVersionCheck.INSTANCE.isAtLeastQ29()
Question:
On my test (using the sample app) after choosing a image from camera/gallery the image do not load into the screen.
I would say this is a sample bug that I need to fix later, not related to your changes and out of the scope of this PR.
But can you confirm me that you was able to load a image from camera/gallery on your tests?
Hi @Canato |
@datdescartes Awesome Job... I did some testing on Google Pixel 4 XL device and it works like charm for me Now It shows camera, Gallery and Files option for me...I verified after cropping image it sending data inside onActivityResult as well :) |
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.
Solid amazing work!
If you are feeling so, join us as team member =)
https://github.com/CanHub/Android-Image-Cropper/discussions/42
Next release coming!
close #20 #52
Bug
Cause:
Wrong Intent for gallery
Reproduce
please refer #20
How the bug was solved:
Copy the code from legacy lib