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 the /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 http://hi.im/simonmacdonald On Wed, Feb 22, 2012 at 1:09 PM, Filip Maj <f...@adobe.com> wrote: > > Joe and I had a discussion about this as I was getting cordova-js shimmed > into the Android implementation. The /sdcard location is not persistent on > 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 can > be cleared out by going into Settings -> Applications -> Your App -> Clear > Data. > > In hindsight I really should have posted about this switch on the mailing > list - my apologies for that. > > I guess it's as good a time as any to discuss the switch and where each of > TEMPORARY and PERSISTENT locations should go to? > > On 12-02-22 9:40 AM, "Simon MacDonald" <simon.macdon...@gmail.com> wrote: > > >Hey, > > > >I've been reading up on all the code changes as it seems like everything > >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 external > >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 > >http://hi.im/simonmacdonald >