问题
I would like to create an application for iOS and Android that (among other things) allows the user to browse the device's photos and select some of them. Thus I would like to present the user with a list of directories containing photos and once a directory is opened, a gallery of the images is displayed.
My questions are:
1) Is there a standard way in Cordova to get a list of the "library" directories such as camera photos, facebook photos, viber photos, screenshots etc.?
2) Is there a way with Cordova to get a thumbnail of each image to display in the gallery (or even better take advantage of each OS' thumbnail caching system), since resizing the original images will run the application quickly out of resources?
Notes:
a) I know about the camera plugin, that has a nice native dialog to pick an image, but it only allows the user to pick one image.
b) I know about the image picker plugin, but it doesn't search in folders other than the camera's directory (i.e. no Facebook, Viber etc. directories).
c) I don't like a & b approaches. Instead I would prefer to display a gallery directly in my app rather than showing a dialog for this.
来源:https://stackoverflow.com/questions/28997384/cordova-phonegap-photo-browser