java me - File connection+j2me -


i want make application can images no matter whether in phone or in external memory. want import images in application. how can possible? came know possible through file connection. not getting exact idea.

  1. get file system roots using filesystemregistry.listroots()
  2. open connection each root in turn using fileconnection fconn = (fileconnection)connector.open(root)
  3. list folder using fconn.list().
  4. for each entry in list, if ends image extension (file.getname().endswith(".png") etc), it's image.
  5. if entry folder (file.isdirectory() returns true) use fconn.setfileconnection(folder) traverse directory/
  6. do same recursively folders in roots.

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -