Closed Mouadabdelghafouraitali closed 4 years ago
Try enabling legacy external storage in your manifest:
<manifest ... >
<application
android:requestLegacyExternalStorage="true" >
</application>
</manifest>
@HBiSoft I've already enabled it, the issue happens with Google Photos Only , if I choose another Gallery app, it works
@Mouadabdelghafouraitali Does it happen with the demo application as well?
Ok, I was able to reproduce this, I will see if I can find a solution. Why would you want to select a video from Google Photos?
@Mouadabdelghafouraitali I've done some tests and I've also asked a question on StackOverflow.
What I have noticed from my tests is that I do not get the crash when specifying intent.setType("image/*");
instead of intent.setType("video/*");
. I guess that Google Photos automatically queries the latitude column when selecting a video file, which is not allowed in Android 10. Google Photos is intended for selecting photos (thus the name "Photos"), but it should still not give this error.
The issue is not with the library, but instead with Google Photos. I will open an issue and try to get feedback from Google.
I will be closing this issue since there is nothing I can do from my end. I will update you when/if I get a response from Google.
EDIT:
I have opened an issue on issuetracker, I will update the issue when I get feedback.
I got the solution. Check my answer here:
Hi, massive thanks for this library, I have an issue, when I select a video file from (Google Photos App), I get the following exception :
The issue happens only on Android 10.0 (API 29) | Emulator, and works perfectly on other versions
Full scenario :
Start choosing a video file by clicking on the pick button > From the menu, choosing the Google Photos App> App crash immediately