Skip to main content

How to create a file on mobile?

1 reply [Last post]
nerj
Offline
Joined: 2009-01-07
Points: 0

Can u please, tell me how to create a simple file on mobile? I got access denied exception when trying to create file.
Please help me-------

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sfitzjava
Offline
Joined: 2003-06-15
Points: 0

There are a lot of issues around filesystem access. I am assuming you are use JSR-75 PIM with the FileConnector.
The location of usable writable areas differ by device (big surprise there). However you can put a couple strategies in place that address most phones. You need to check for a "priviate" type of root file system, using the FileSystemRegistry.listRoots().

Sometimes you have to go to an external SD card, or write in an existing folder.
Usually file:///c:/photos or file:///c:/videos work for storing information.

That should be enough information so you can figure it out. :)

Happy hunting.
-Shawn