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

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -