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 280ABE204 for ; Tue, 22 Jan 2013 22:24:13 +0000 (UTC) Received: (qmail 81039 invoked by uid 500); 22 Jan 2013 22:24:12 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 80980 invoked by uid 500); 22 Jan 2013 22:24:12 -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 80968 invoked by uid 500); 22 Jan 2013 22:24:12 -0000 Delivered-To: apmail-incubator-callback-dev@incubator.apache.org Received: (qmail 80965 invoked by uid 99); 22 Jan 2013 22:24:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 22:24:12 +0000 Date: Tue, 22 Jan 2013 22:24:12 +0000 (UTC) From: "Simon MacDonald (JIRA)" To: callback-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-285) Add property returning root path of PhoneGap files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560109#comment-13560109 ] Simon MacDonald commented on CB-285: ------------------------------------ IMHO we should stick to the W3C spec. On Android PERSISTENT maps to the sdcard if available or internal storage if not. Most of the questions we get is how to get to internal storage. My suggestion would be to provide a new constant, APP for instance, that points to the internal storage directory. Then publicize that we are we be switching the PERSISTENT constant to point to APP in PG 3.0.0 to give people a chance to realize that they are not going to be saving to the sdcard anymore. Then we keep the APP constant around for 6 months past 3.0.0 and deprecate it. Writing to the jail, seems to be what the users want, plus Joe/Fil are on board as well. I just want to give the users a migration path. > Add property returning root path of PhoneGap files > -------------------------------------------------- > > Key: CB-285 > URL: https://issues.apache.org/jira/browse/CB-285 > Project: Apache Cordova > Issue Type: Improvement > Components: CordovaJS > Affects Versions: 1.4.0 > Environment: Both PhoneGap SDK and PhoneGap Build > Reporter: Ashley Gullen > Assignee: Andrew Grieve > Labels: features > > There needs to be a property in PhoneGap that returns the root path to the general files added to the PhoneGap project (i.e. the directory index.html is in). For example, if I add 'music.mp3' to my project, in Android it will be located in: > /android_asset/www/music.mp3 > On iOS after being built with PhoneGap Build it will be located in some path like this: > /var/mobile/Applications//.app/www/music.mp3 > However, there does not appear to be a programmatic way to determine both and .app. > This has two side effects: > 1. Paths to audio for Media must be hard-coded separately depending on the platform, which is inconvenient. > 2. Paths to audio for Media cannot be known if developing a framework that uses PhoneGap. Since a framework does not know the App ID or name in advance, it's impossible for the framework to determine the correct path. > This is actively blocking audio from working on iOS in PhoneGap projects exported by Construct 2 (www.scirra.com), a HTML5 game creator. Also, it seems like kind of an important function to make available anyway, since hard-coding paths for each platform is a pain. > This PhoneGap Support thread led to this issue: http://phonegap.tenderapp.com/discussions/questions/208-android_asset-equivalent-for-ios -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira