incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: Changes to requesting a PERSISTENT file system in Cordova-Android
Date Wed, 22 Feb 2012 19:56:17 GMT
Agreed that "this will break what users have been doing before" is a bad

Seems like that is a common issue coming up recently (toURI vs toURL on
Entry objects, now this).

The arguments Joe presented to me on changing the location of the storage
were compelling. Joe, can you reiterate them on the list so we all know
what's up?

I believe we need to change them eventually. Now how do we go about doing
this? A deprecation-style message and a clear roadmap / delivery with a
specific release?

On 12-02-22 11:50 AM, "Simon MacDonald" <> wrote:

>I agree with your points but I'm worried that we are making a change for
>current PhoneGap Android developers. They are assuming their data is on
>/sdcard and now we are moving the location of their root filesystem. That
>means they'll need to write code to move any files from the /sdcard to the
>internal storage directory as they update their app from PhoneGap 1.4.1 to
>Apache Cordova 1.5.0. Alternatively, we could put a check into Cordova to
>do this work for them.
>IIRC the internal storage directory is protected via the UNIX filesystem
>permissions so if I wanted to store a image/audio/video file and call an
>intent to view/play the file it wouldn't work.
>Also, with the temporary storage on
>/sdcard/Android/data/<package_name>/cache/ it will be cleaned up when the
>user uninstalls the application.
>Anyway, I'm not adverse to making the move I just want to make sure we
>think through all the ramifications of the change.
>Simon Mac Donald
>On Wed, Feb 22, 2012 at 1:09 PM, Filip Maj <> wrote:
>> Joe and I had a discussion about this as I was getting cordova-js
>> into the Android implementation. The /sdcard location is not persistent
>> Android - you can take the SD card out at any time.
>> We ended up using internal storage as the way to go -
>> /data/data/<package>/ as the persistent storage (can't get wiped) and
>> /data/data/<package>/cache as the temporary storage. The ../cache path
>> be cleared out by going into Settings -> Applications -> Your App ->
>> Data.
>> In hindsight I really should have posted about this switch on the
>> list - my apologies for that.
>> I guess it's as good a time as any to discuss the switch and where each
>> TEMPORARY and PERSISTENT locations should go to?
>> On 12-02-22 9:40 AM, "Simon MacDonald" <>
>> >Hey,
>> >
>> >I've been reading up on all the code changes as it seems like
>> >is
>> >different after four days without internet. One of the things that I
>> >noticed is that the command:
>> >
>> >    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess,
>> >onError);
>> >
>> >Now returns the path "/data/data/{app package name}". In the previous
>> >release it returned "/sdcard" or whatever the path of the mounted
>> >storage is. So I was just wondering what the rational behind the change
>> >was
>> >and are we worried that everyone who's written an Android app
>> >using window.requestFileSystem() will suddenly find their root path has
>> >changed?
>> >
>> >Simon Mac Donald
>> >

View raw message