Tuesday 15 June 2010

javascript - Display all images from Sdcard -


I am using PhoneGap 2.2.0. I would like to get all the images / photos / wallpapers with the image saved path from my Android device. So far I have

   & Lt; Img style = "display: none;" Id = "largeImage" src = "" /> & Lt; / Body & gt; & Lt; / Html & gt;   

The code gives me only one image, but I want all images

You need to create a directory reader to search for .svg files through all entries in root FS and loop.

  function gotFS (fileSystem) {var reader = fileSystem.root.createReader (); Reader.rendrecess (matching, unsuccessful) l} found function list (entries) {var i; (I = 0; i & lt; entries; album; i ++) {if (entries [i] .name.indexOf (".svg") = -1) {uploadPhoto (entries [i] .fullpath) ; }}}    

No comments:

Post a Comment