1 - You can use "RMS" instead of "fileconnection" to maintain the status of your application, and it does not have harassment.
2-Application opens a connection using Connector.open (), as you do. The input line must contain the full, absolute path to the form:
file://<host>/<root>/<directory>/<directory>/.../<name>
The host element may be empty - and often will, when a line refers to a file on the local host. The root directory corresponds to a logical mount point for a specific storage unit. Root directory names refer to devices . The following table provides examples of root values ββand how to open them:
CFCard/ FileConnection fc = (FileConnection) Connector.open("file:///CFCard/"); SDCard/ FileConnection fc = (FileConnection) Connector.open("file:///SDCard/"); MemoryStick/ FileConnection fc = (FileConnection) Connector.open("file:///MemoryStick/"); C:/ FileConnection fc = (FileConnection) Connector.open("file:///C:/"); / FileConnection fc = (FileConnection) Connector.open("file:////");
Some special root must be earned by the System.getProperty () method:
fileconn.dir.photos: Image capture through your Mobile camera. fileconn.dir.videos: Vedio capture through your Mobile camera. fileconn.dir.tones: Ring tones default directory. fileconn.dir.memorycard: Memory Card , SD Card , Flash Drive root directory fileconn.dir.private: Working directory of midlet
For instance:
String galleryDir = System.getProperty("fileconn.dir.photos"); FileConnection filecon = (FileConnection) Connector.open(galleryDir);
source share