Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8EB617A08 for ; Mon, 27 Jul 2015 14:41:41 +0000 (UTC) Received: (qmail 18950 invoked by uid 500); 27 Jul 2015 14:41:02 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 18908 invoked by uid 500); 27 Jul 2015 14:41:02 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 18894 invoked by uid 99); 27 Jul 2015 14:41:02 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jul 2015 14:41:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 8EE5CD7F42 for ; Mon, 27 Jul 2015 14:41:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.612 X-Spam-Level: * X-Spam-Status: No, score=1.612 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, RP_MATCHES_RCVD=-1.289, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=google.com header.b=jHP5S8px; dkim=pass (1024-bit key) header.d=chromium.org header.b=dg365jhm Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GFTR2foWeeBa for ; Mon, 27 Jul 2015 14:40:53 +0000 (UTC) Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 6AAEA2312F for ; Mon, 27 Jul 2015 14:40:53 +0000 (UTC) Received: by igbij6 with SMTP id ij6so74477897igb.1 for ; Mon, 27 Jul 2015 07:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=Ojcha3AtGSxSKWZ3DacHBgVBQzDIre2rMhqlCnSJ0Rg=; b=jHP5S8pxxmGSq9pOqW7MN6kqGkkKvt34MYU67eW5xdvzvhrpufRE5bGB9Tmj0K+IT7 Bys4GYYcGTSC41AEGnWEr8LP42wuuaUyCIsfP3ssxcQ7rVx7PoPfDYS36L2ydj1dxuJN JwOC7drIDeUnx1yba6hIkF/vPQBBOKSany/kr1kvextMDtQSo47aGmeKMUHBQbUxYKdM GEkOIJ2KxhWP/JRvThQ7gOfM3f7cLntRFTmQ+Fbc7Yl62CGXlRdOYAlhbK5ZIXvC2l+2 aJ00WYcPJy4VoeNxGmOuApo5mE+Q+qr99CpSJXvwwL5783+rJSs9aNu8WXXqFBsGjVgO xEaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=Ojcha3AtGSxSKWZ3DacHBgVBQzDIre2rMhqlCnSJ0Rg=; b=dg365jhmKMyNxai4MnMLpTGlD8gNlWCRRUYxEj/a7gOHUw2UYcgTH8b5MpAMIsLO4G oZzzHk5QYwMo0bbunF9sdnDSb/yGh6hrYkK2Rf02U9IQ8Q8xxZGBoXOBGaau8G6QoE4w +L3qRhCmcKRZ+8uVrx/PYTf4UOlKESl5YdZ4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=Ojcha3AtGSxSKWZ3DacHBgVBQzDIre2rMhqlCnSJ0Rg=; b=lqneTw0QethFATuorftwLnRiELxyLsF2HiZygpjOztlNS+ZwCpBtd9mvJ5JKAT49SK OJvk/5BU0QpTFPF8iT4TdN5wQNWT8sk5ZVip4ZjXxSPUgFy+AhdkKTEsAiqF+9ipDWDs sW7m6QEyvRqw2tVg5O2J00gjRHX5q4QCWGmXk68L907cwkRtCFbB1UlAWujFeiQXqs9i 5g2zHZS8vfwd90JmcvrFrM1W6F3QonStiVqY7U8afiwoJ85kXFfBKUVJHcCA1WqO3Hqy V9XJmLS+SoAbDcGVs7qvnkPzQ3YIF7DNvbT1Fa1YMyUAgQx5FiYVx1VOwHE76BhDCcn6 pzHA== X-Gm-Message-State: ALoCoQknrPU/1ceU+jfkWJsWton+b7n7NcqggzKI5GrvE2Kuqv3YKxNXP9fi44H9+i0y5LLMxAHc X-Received: by 10.107.12.104 with SMTP id w101mr40781244ioi.110.1438008052020; Mon, 27 Jul 2015 07:40:52 -0700 (PDT) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.36.130.198 with HTTP; Mon, 27 Jul 2015 07:40:32 -0700 (PDT) In-Reply-To: References: From: Andrew Grieve Date: Mon, 27 Jul 2015 08:40:32 -0600 X-Google-Sender-Auth: WP7URhXe7f1_MEHM5X9BKCd9dR4 Message-ID: Subject: Re: Make internal storage default on Android To: dev Content-Type: multipart/alternative; boundary=001a113dfc3a202d4d051bdc576b --001a113dfc3a202d4d051bdc576b Content-Type: text/plain; charset=UTF-8 Ian and I made the switch to internal (via the preference). - I thought at one point the default app template set the preference to internal, so that new apps would get the better behaviour and existing apps would continue to work. I don't see this happening now though :( - The duplicate files/files, although oddly names, was just meant to give the HTML5 FS root a directory that isolated from the rest of the app's internal storage (so that it doesn't conflict with files put there by plugins) Anyways, +1 for just switching this default and bumping the version. On Wed, Jul 22, 2015 at 9:27 PM, Carlos Santana wrote: > ding ding ding we have a winner , Are the blackberry guys still around on > this mailing list by the way? > On Wed, Jul 22, 2015 at 10:00 PM Simon MacDonald < > simon.macdonald@gmail.com> > wrote: > > > As near as I can tell Windows use internal private storage as well. > > > > Simon Mac Donald > > http://hi.im/simonmacdonald > > > > On Wed, Jul 22, 2015 at 5:32 PM, Carlos Santana > > wrote: > > > > > I think cross platform web developers would expect all platforms to > have > > > same default. What the default for windows? > > > > > > +1 make default internal at least will have iOS and android with same > > > expectations > > > > > > We need to change the Major number (sever) for the version, it feels > like > > > is changing an API > > > > > > I like the explicit even if it's not needed because the default is > > > internal. But if they see it there it reminds them that internal is > being > > > used. > > > On Wed, Jul 22, 2015 at 4:02 PM Darryl Pogue wrote: > > > > > > > +1 because saving to the SD Card has added problems with other apps > > (such > > > > as photo and music apps) picking up files that they shouldn't. > > > > > > > > Nothing more annoying than accidentally unleashing 200 logos and > icons > > > into > > > > the photos app of unsuspecting users. > > > > > > > > On 22 July 2015 at 12:47, Simon MacDonald > > > > > wrote: > > > > > > > > > *TL;DR Summary* > > > > > > > > > > We should switch the default for the Cordova Android File System to > > be > > > on > > > > > internal storage, not the SD Card (or emulated SD card). > > > > > > > > > > > > > > > *Long Version* > > > > > > > > > > Currently in Cordova Android when you use this code "window. > > > > > requestFileSystem(PERSISTENT, 0, win, fail);" the root file system > > path > > > > > that is returned is "/storage/emulated/0" i.e. "/sdcard". > > > > > > > > > > Why you may ask? Because back in 2010 or so Bryce Curtis and I > argued > > > > that > > > > > we should use the external storage location because internal > storage > > > was > > > > > not very large on Android 2.x and we didn't want to have developers > > > > filling > > > > > up the devices limited internal storage. Joe Bowser argued against > it > > > > > because of issues with the SD Card on Android but was eventually > out > > > > voted. > > > > > > > > > > Now, I'm prepared to admit that Bryce was wrong (see what I did > > > there?). > > > > I > > > > > feel that the default behaviour for > > > "window.requestFileSystem(PERSISTENT, > > > > > 0, win, fail);" should be to resolve to a location on internal > > storage > > > > that > > > > > meets the following requirements: > > > > > > > > > > a) private to the application > > > > > > > > > > b) removed when the application is uninstalled > > > > > > > > > > c) lines up with what we have on iOS and WP > > > > > > > > > > In fact you can get this behaviour right now but setting the > > following > > > > > preference in config.xml: > > > > > > > > > > /> > > > > > > > > > > This gets you a root file path of "/data/data/ > > > > package>/files/files/". The double "files" is an issue but we can > > > > probably > > > > > ignore it for now. > > > > > > > > > > If a user wants the old behaviour they only need to make the > > > preference: > > > > > > > > > > > value="Compatibility" > > > /> > > > > > > > > > > and the original behaviour will be retained. > > > > > > > > > > What I'm advocating for is to make internal storage the default > > > behaviour > > > > > for Cordova Android. > > > > > > > > > > > > > > > *Code Changes* > > > > > > > > > > I've already taken a brief look into this and I feel the change is > > > > > extremely minor. We need only change the default return value from > > > > > "compatibility" to "internal" at line 156 of FileUtils.java ( > > > > > https://github > > > > > > > > > > > > > > > .com/apache/cordova-plugin-file/blob/master/src/android/FileUtils.java#L156 > > > > > ). > > > > > > > > > > If we wanted to make the change explicit to the user we could > change > > > > > plugin. > > > > > xml to add the preference to config.xml as well. > > > > > > > > > > Thoughts, comments, applause? > > > > > Simon Mac Donald > > > > > http://hi.im/simonmacdonald > > > > > > > > > > > > > > > --001a113dfc3a202d4d051bdc576b--