-
Notifications
You must be signed in to change notification settings - Fork 314
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 report] getassetpathlist() returns empty results #942
Comments
@asdjfasdfkljdas did you find any solution? |
It was on version 2.5.2. I updated the package to latest (2.6.0) and now it works. I'm still confused as to why 2.5.2 would be broken though. |
Even I have updated to 2.6.0 but final List paths = await PhotoManager.getAssetPathList() is returning an empty list everytime in my app on Android 13. However if I run the example app it works very well on Android 13. I have added the
to the manifest. Am I missing something? |
Can you share your code? Remove any filters etc. - reduce your code to the absolute minimum required to prove the issue and I'll take a look. The only other thing I changed is to request permissions a little differently, here's my full code:
I'm using the following package for this:
I don't consider this the solution, since I don't think it worked with this changed, it worked as of the version update. But this is definitely worth a try as it's exactly the same set-up as mine, and mine works now. If you have a version that works (the example app), and a version that doesn't (yours), the answer lies in whatever the difference is. I'd take the approach of building up the example app until the problem's reproduced (or vice versa, reduce your own custom app until the problem goes away). |
I have copied the code from the example app, and made everything the same, still the getAssetPathList returns empty list. Any changes in the Android files that I am missing? I am using this code in my app https://github.com/phuongtinhbien/album_image/tree/master/lib/src so instead of importing album_image, I manually added the code and in that I want to edit album_image_picker.dart. This works perfectly on Android 12 or below. Any suggestion what could be broken? |
Solved it!!, I had set the targetSdkVersion to 32, changed it to 33 and it started working |
So, the problem is that the target sdk version is not the 33 or higher? |
Duplicate of #852 |
Version
2.5.2
Platforms
dart, Android
Device Model
Various android phones
flutter info
How to reproduce?
I've shipped the following code to various android devices (2 tablets, 4 mobile phones).
On 2 of the mobile phones, getAssetPathList() simply returned nothing, an empty list. Works perfect on the other devices.
What I've tried/ruled out before concluding it must be a bug in the lib:
Logs
No response
Example code (optional)
Contact
dan@stacksoftware.co.uk
The text was updated successfully, but these errors were encountered: