Sunday, June 01, 2008

My Thesis - Literature Study - JSR 75

In order to add database backup and recovery ability into this thesis project, there must be a way to store files into phone’s file system. It is why JSR-75 is needed in this application development. According to Sun’s developer website [1], JSR-75 can handle local file connection and local file creation functions. File creation is needed during database backup, while file connection will be needed during the database recovery. Besides for database backup and recovery system, JSR-75 will also be utilized for storing files which are transferred from the server into the client’s local file storage.

FileConnection is the class that will handle connections to the device’s file system. Once a connection to a file system is established, several kinds of queries can be performed using the FileConnection object's methods, including:
  • Get a filtered list of files and directories using the method list(String filter, boolean includeHidden). In the filter parameter * can be used as a wildcard to specify zero or more occurences of any character. The includeHidden parameter specifies whether to list only visible files, or hidden files as well.
  • Discover whether a file or directory exists using exists().
  • Discover whether a file or directory is hidden using isHidden().
  • Create or delete a file or directory using create(), mkdir(), or delete().

Moreover, in order to list directory roots in a device, listRoots() method of FileSystemRegistry can be used.

However, there is one important issue that should be concerned, that is about directory access permission in Nokia mobile phones. According to Nokia’s “MIDP 2.0 Signed MIDlet Developers Guide” [2], there are two kinds of application, Trusted application and Untrusted application. Untrusted application will not have access to the file system unless it has been confirmed by the user. Thus, it will keep asking for confirmation every time the application tries to establish a file connection. On the other hand, Trusted application is able to access the file system without having user confirmation. To become a Trusted application, an application has to be legally signed. This application signature is available for purchase at Verisign [3] at the price of $499(the price is valid by April 2008). Regarding the lengthy period for the application testing and the funds needed in acquiring the signature, the resulting application of this project will not be a signed one.


Reference:
[1] Sun Developer Network Site: J2ME technology reference. http://developers.sun.com/mobility/reference/techart/index.jsp.
[2]
MIDP 2.0 Signed MIDlet Developers Guide version 2.0, Forum Nokia. MIDP_2_0_Signed_MIDlet_Developers_Guide_v2_0_en.pdf.
[3]
Verisign: Digital Code Signing. http://www.verisign.com/products-services/security-services/code-signing/digital-ids-code-signing/index.html.

No comments: