From callback-dev-return-2820-apmail-incubator-callback-dev-archive=incubator.apache.org@incubator.apache.org Wed Feb 29 19:40:19 2012 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 DD77C91EC for ; Wed, 29 Feb 2012 19:40:18 +0000 (UTC) Received: (qmail 81632 invoked by uid 500); 29 Feb 2012 19:40:18 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 81601 invoked by uid 500); 29 Feb 2012 19:40:18 -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 81593 invoked by uid 99); 29 Feb 2012 19:40:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 19:40:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 19:40:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3768DC7181 for ; Wed, 29 Feb 2012 19:39:57 +0000 (UTC) Date: Wed, 29 Feb 2012 19:39:57 +0000 (UTC) From: "Ashley Gullen (Commented) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1031111614.4223.1330544397228.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1952143966.3015.1330524117494.JavaMail.tomcat@hel.zones.apache.org> 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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CB-285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219447#comment-13219447 ] Ashley Gullen commented on CB-285: ---------------------------------- No, this isn't for writing files at all. Basically, if I bundle an MP3 next to the index.html file, it's impossible to programmatically determine the path to the MP3 file to pass to PhoneGap's Media object. So it's impossible to programmatically play the MP3 file. That's what I need it for! > Add property returning root path of PhoneGap files > -------------------------------------------------- > > Key: CB-285 > URL: https://issues.apache.org/jira/browse/CB-285 > Project: Apache Callback > Issue Type: Improvement > Components: CordovaJS > Affects Versions: 1.4.0 > Environment: Both PhoneGap SDK and PhoneGap Build > Reporter: Ashley Gullen > 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira