How to share a file between 2 applications.

Login to reply to this topic.
Thu, 2007-05-17 12:57
Joined: 2005-11-29
Forum posts: 15
Hi!
I'm developing in Symbian S60 3rd Edition ( Nokia N80 ).
I want 2 apps to access the same text file in read/write mode. The only way i found to do that is saving the file into a folder where every app can read and write ( i.e. \data\others\ ), but I want my apps to be Symbian Signed and this solution doesn't seem to be the best way to get it. Anybody could access this file with a file browser.

Is there any way to make a file accessible by only 2 applications specifying their UID's Huh??

Thak you all.

Fri, 2007-05-18 13:30
Joined: 2004-11-29
Forum posts: 1134
Re: How to share a file between 2 applications.
Only by writing a server that regulates access to the file.

As in, a server keeps the file in its private folder, and you implement file access function (open/read/write) using IPC to the server, and the server then does the file actions.

But, will you save sensitive data in the file?

If not, this is no issue, just create the file in \data\others.

Symbian signed doesn't care about the security of your program as long as it doesn't break the security of the system.
Mon, 2007-05-21 17:24
Joined: 2005-11-29
Forum posts: 15
Re: How to share a file between 2 applications.
Thank you.
The data in the file are sensitive for my program.

I read in www.symbiansigned.com, in TOOL1 section that anyone could access "public" folders with a file browser and move, copy or delete the files of my application. But checking again the tests I have to pass to get Symbian Signed Certificate I notice that it's not forbidden to create "free access" files... I hope.

Thanx, again.
Wed, 2007-05-23 11:12
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1886
Re: How to share a file between 2 applications.
Quote
I read in www.symbiansigned.com, in TOOL1 section that anyone could access "public" folders with a file browser and move, copy or delete the files of my application.
And that's true  Wink Only writing into a private directories can make your application have safe data (or at least almost safe).

Quote
But checking again the tests I have to pass to get Symbian Signed Certificate I notice that it's not forbidden to create "free access" files... I hope.
You can create files almost anywhere on the free accessible file system. Symbian Signed only requires that:
- you don't do so if the file system has almost no space left
- you clean up everything correctly when your application is uninstalled.

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Wed, 2007-05-23 11:50
Joined: 2005-11-29
Forum posts: 15
Re: How to share a file between 2 applications.
Thank you.
My fear is about test PKG-02. If somebody deletes or modifies the files of my application stored in \data\others, my app won't work properly, and the PKG-02 test will fail.
I don't know how much strict is the SymbianSigned Certificate.
Wed, 2007-05-23 13:37
Joined: 2005-06-09
Forum posts: 174
Re: How to share a file between 2 applications.
Input data should always be checked, ie. your app shouldn't misbehave just because your data files have been altered or removed.

I'm quite certain that this sort of error won't be discovered in Symbian Signed testing, though.  But test methodology isn't dictated by the Symbian Signed criteria, so there are no guarantees.

Wed, 2007-05-23 14:49
Joined: 2004-11-29
Forum posts: 1134
Re: How to share a file between 2 applications.
Note though that correct behavior might be "Display dialog "file not found", then exit application when user press "ok"".

As long as your application doesn't crash or leak resources or anything like that when the file is not there, it is ok.
  • Login to reply to this topic.