Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5253E97BC for ; Wed, 22 Feb 2012 20:00:45 +0000 (UTC) Received: (qmail 31637 invoked by uid 500); 22 Feb 2012 20:00:45 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 31613 invoked by uid 500); 22 Feb 2012 20:00:45 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 31605 invoked by uid 99); 22 Feb 2012 20:00:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 20:00:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon.macdonald@gmail.com designates 209.85.210.47 as permitted sender) Received: from [209.85.210.47] (HELO mail-pz0-f47.google.com) (209.85.210.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 20:00:38 +0000 Received: by daln34 with SMTP id n34so348804dal.6 for ; Wed, 22 Feb 2012 12:00:17 -0800 (PST) Received-SPF: pass (google.com: domain of simon.macdonald@gmail.com designates 10.68.231.134 as permitted sender) client-ip=10.68.231.134; Authentication-Results: mr.google.com; spf=pass (google.com: domain of simon.macdonald@gmail.com designates 10.68.231.134 as permitted sender) smtp.mail=simon.macdonald@gmail.com; dkim=pass header.i=simon.macdonald@gmail.com Received: from mr.google.com ([10.68.231.134]) by 10.68.231.134 with SMTP id tg6mr83206328pbc.115.1329940817275 (num_hops = 1); Wed, 22 Feb 2012 12:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Sy+Kb+9Te4DLfLW7zIt1c/MOiPVz4BGQuPCJJcEBAgE=; b=FqbFKug3e8biafuCRVZrjN0pmCG/fbq5RcNw0+sJs1ulJpSNHooxPkZJdYoTOXDd26 p05DfAMe/CYe3jUh75g0+3nNMhKpcq/yCx8VysXE90KYiHrQdJGNDGvkwFs1yaHe3jfe KVWMD6sj5L6j+9c1rOniKCzAQMGDglIMDjsuE= Received: by 10.68.231.134 with SMTP id tg6mr68466728pbc.115.1329940817180; Wed, 22 Feb 2012 12:00:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.10.170 with HTTP; Wed, 22 Feb 2012 11:59:57 -0800 (PST) In-Reply-To: References: From: Simon MacDonald Date: Wed, 22 Feb 2012 14:59:57 -0500 Message-ID: Subject: Re: Changes to requesting a PERSISTENT file system in Cordova-Android To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b339c39faf8ce04b992f93e X-Virus-Checked: Checked by ClamAV on apache.org --047d7b339c39faf8ce04b992f93e Content-Type: text/plain; charset=ISO-8859-1 Yeah, I'm in favour of deprecating things as we go along and making the big change for the 2.0 release as Michael suggested in a previous thread. Simon Mac Donald http://hi.im/simonmacdonald On Wed, Feb 22, 2012 at 2:56 PM, Filip Maj wrote: > Agreed that "this will break what users have been doing before" is a bad > thing. > > 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 > >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//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 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// as the persistent storage (can't get wiped) and > >> /data/data//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" > >>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 > >> > > --047d7b339c39faf8ce04b992f93e--