How exactly do you use 'getAssetsAsync'?

SDK Version: 4.3.5
Platforms: Android/iOS

I have been using expo-media-library to save images from my phone or take pictures and save them using the ‘createAssetAsync’ method. I am now trying to retrieve the saved images using the ‘getAssetsAsync’ method but I don’t quite understand how to use it. How exactly do I refer to the Image I want to retrieve? Where exactly is the ID? I can’t find it, and when I download the picture to my PC and check the properties the ‘Image ID’ field is null.

Check out the following repo. It has good source code to illustrate how getAssetsAsync() works. I’m also trying to understand the exact scenarios for Apple’s limited photo selection (ie. Select more\Keep existing) and how it interacts with this API. You can also create a fresh Expo project and start playing with the API pretty easily, using “console.log(asset)” to see what information is available.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.