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

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

java - Getting corefrences with Standard corenlp package -

Java - Returning an array from a method to main -