Closed allanctan closed 3 years ago
Upon checking further, it appears the images is sorted ascending, so the first item is the oldest image and last item is the latest. Perhaps adding clarification in the documentation would be helpful to others as well.
I have the same problem, the request is not giving me all the pics from the album, for example: my Whatsapp Image album have around of 25000 images, but, the request is bringing me only 8, it's so weird, maybe is a problem with the cache, i don't know, and, for sort the pics, you can use the .sort() method on this way:
imagenes.sort((a, b) => b.modifiedDate.compareTo(a.modifiedDate));
I sort the pics from the Date, but you can do it how do you want.
You can specify newest
argument in listMedia
function to sort the result ascending or descending as you want.
When I retrieve images, it seems to retrieve a different result again the default phone image gallery. Also, newer photos uploaded is not in the list when refreshed.