Closed iveyalkin closed 7 years ago
Hello, @iveyalkin !
Main cause of this problem is "Google Photo" shares ContentUri with fixed string like "content://com.google.android.apps.photos.contentprovider/1/1" and connect it with a static temporary values. "Google Photo" does not provide the file path when the actual Activity or Context which receives Intent.ACTION_SEND. Maybe, it is the policy of "Google Photo", not to expose the private image file to other app. For example, you defines 2 Activity in Manifest file, Actvity A and Activity B. Activity A for receives the Intent.ACTION_SEND. Activity B for processing the image file. Activity A forward the intent to Activity B. Then Activity B is not the correct Activity to "Google Photo", you encounters the SecurityException. So, I recommend you to save the file temporarily on Activity A and use the temporary file path on Activity B.
Thank you for such a detailed explanation! [UPDATED] Yeah! You are totally right. I haven't properly evaluated the source issue. And yes, https://github.com/Yalantis/uCrop/pull/227 doesn't help due to the way the URI permissions granted by the Photos app.
~However, if I got it right, it would happen constantly on a broad variety of devices with various Android APIs. In fact, according to our Crashlytics reports, only a small portion of our users are affected by the issue.~ ~As I mentioned earlier, any particular ETA for https://github.com/Yalantis/uCrop/pull/227 ? Maybe you've decided to not release it for certain reason. Could you elaborate on that?~ Thanks!
Do you want to request a feature or report a bug? bug
What is the current behavior? Application crashes
What is the expected behavior? Don't crash
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. See https://github.com/Yalantis/uCrop/issues/212
Please attach any image files, URL and
stack trace
that can be used to reproduce the bug.Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop? We use uCrop
2.2.0
. At least devices with API 21+ are affected.Actually, it's fixed in https://github.com/Yalantis/uCrop/pull/227 but the latest release that is
2.2.1
seems doesn't include the fix. Are you planning for releasing it and when if so? Thank you!