-
Notifications
You must be signed in to change notification settings - Fork 217
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
Provide success and error callbacks, and the "Not an image" error. #48
base: master
Are you sure you want to change the base?
Conversation
Are you able to get the changes on Android too? |
Android is already playing nicely showing a toast into Picasso when it's not an image. |
I disagree with you @Hypher. Because what if on android we have already denied the permissions and never ask again? There is no way to provide feedback! |
This issue is not about permission. It's about:
Yes it's not consistent with Android since Android does not send the very same message through the bridge when its "not an image" ; instead it shows a toast in Picasso, and report an error through the bridge. But it was not consistent too when iOS crashed... (and when there was just NO callbacks at all) So, this pull request fixes an important issue, and provide more feedback, and must be accepted. Then, if you want, you can make your API consistent, and maybe deal with permissions etc. |
Hi Hypher? So calling the code without having the right permissions won't result in an error? There will be no way to find this out? |
If there is no permission it will call the error callback with : @sarriaroman sorry but I modified the package name in the last two commits to be able to use it in my project. Feel free to drop these changes when you merge it |
I will need to get the changes for Android before merge it. The plugin is intended for both. |
@Hypher thanks for PR (see my fork only for iOS: https://github.com/WuglyakBolgoink/CkOpenImage) |
Could you merge this PR please. I use this plugin to show photo and i need callback function to define actions when user click on close button. |
Moved callbacks into the async task on iOS
No API changes, just two optional parameters