cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: [Android] Explicitly writing to the jail
Date Fri, 07 Dec 2012 17:14:45 GMT
I think we had talked about a LocalFileSystem.APP target a while back:

On 12/7/12 6:29 AM, "Simon MacDonald" <> wrote:

>Hey all,
>There is no reason why the FileWriter can't write to
>/data/data/com.yourappnamespace/ in fact it does quite well. The root
>cause of the problem, if I can read between the lines, is that there
>is no good way for the app developer to find this directory without
>doing some hard coding of the path.
>Here is my proposal for moving forward while not abandoning our
>current user base. Please bear with me as it will not be W3C standard
>but it will get there.
>1) Add a new LocalFileSystem type called APP: LocalFileSystem.APP
>2) When you do a window.requestFileSystem() with the APP type the path
>for the root directory should be "/data/data/com.yourappspacename/" on
>Android, a similar path on BB and on iOS is should return the same
>value as what you get when asking for a PERSISTENT file system.
>3) Announce the hell out of the fact that PERSISTENT will become APP
>in 6 months.
>4) In May/June (PhoneGap 3.0 anyone) finally make it so requesting the
>PERSISTENT or APP file system will give you the same path.
>What do you think?
>Also, if we move to writing everything to the "jail" then we will need
>a solution where the developer will want to launch an intent to handle
>a file from that directory. That can be a problem since the "jail" is
>not accessible to other apps. We can set the file to be world readable
>but then we'd need to provide a facility to allow them to control the
>file permissions. Just something to think about.
>Simon Mac Donald
>On Thu, Dec 6, 2012 at 4:22 PM, Joe Bowser <> wrote:
>> Hey
>> I'm looking at the FileWriter API and I have no idea how we could
>> explicitly write to the app jail on Android
>> (/data/data/com.yourappnamespace/).  I feel like our FileWriter is
>> pretty dated and that we should re-evaluate how it works, since many
>> devices don't use SD Cards anymore for their storage due to the limit
>> on SD Card storage?  Also, it'd be good to allow users to have
>> persistant, protected storage that other apps can't mess with.
>> Thoughts?
>> Joe

View raw message