Skip to main content

How to create a file on mobile?

1 reply [Last post]
Joined: 2009-01-07

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.
Joined: 2003-06-15

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.