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 59463E483 for ; Mon, 11 Feb 2013 20:27:10 +0000 (UTC) Received: (qmail 854 invoked by uid 500); 11 Feb 2013 20:27:10 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 838 invoked by uid 500); 11 Feb 2013 20:27:10 -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 828 invoked by uid 99); 11 Feb 2013 20:27:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2013 20:27:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=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.128.172 as permitted sender) Received: from [209.85.128.172] (HELO mail-ve0-f172.google.com) (209.85.128.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2013 20:27:04 +0000 Received: by mail-ve0-f172.google.com with SMTP id cz11so5648531veb.3 for ; Mon, 11 Feb 2013 12:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=m4BBRoQ5vFP0lr4EI4lA4/pySfXc7lshd34iPVrez6M=; b=0rg3g2z1ybjjHHdcgzLVr8K/1OTnK4LbiGxDnGwzMR+AFzOrY4mho7ohA1Pgu9VIzC DuFOWRePVTDdxlsy4F2LKgijJCnUpn3be1ryJ2+z6E4XIIkZXzZA1lqY96CTEAKiw3GN rP5QlzfYoxqZMYV5cFg0LH6/bu0wZSWc0hhlhk10nlbGb9qpKzBXOS0TA7hT3F0L52Bg VXxgwWdzazAJj6TIxy9B86GC1Ighnq86OIBqu1WyLdYIIlxOWyxfGskI9p070CKNpjjF zymrg8Pwj19HyBgoNSICO4SEDak0nfMShv36Hzd/TfLTOB18XxpVD9tX5/tCBWBZQVv5 Wifg== X-Received: by 10.58.134.14 with SMTP id pg14mr20649504veb.42.1360614403836; Mon, 11 Feb 2013 12:26:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.243.129 with HTTP; Mon, 11 Feb 2013 12:26:23 -0800 (PST) In-Reply-To: References: From: Simon MacDonald Date: Mon, 11 Feb 2013 15:26:23 -0500 Message-ID: Subject: Re: Android file chooser To: "dev@cordova.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Check out some code I wrote in a side project that can do it. https://github.com/macdonst/corinthian Simon Mac Donald http://hi.im/simonmacdonald On Mon, Feb 11, 2013 at 3:05 PM, Max Woghiren wrote: > You're right about the FileUtils API, but I need a Cordova File object to > access those methods. yields a native File object, so, > for instance, I can't use FileWriter with it. Native File objects also > don't have full paths, which are useful (eg. for FileTransfer.upload, which > requires a full path). > > A file chooser would provide the full path, with which a Cordova FileEntry > can be created. > > On Mon, Feb 11, 2013 at 2:25 PM, Joe Bowser wrote: > >> I'm not familiar with Chrome's API, but I believe that there is a >> FileUtils API as well as the File Picker that Simon added a release >> ago that fires an intent to pick a file if you have a file picker >> installed. (Note: I don't use one, so it brings up the Gallery, Audio >> Player and other things associated with the intent, which is >> technically the correct behaviour). >> >> To use the file picker, you just have . >> >> Joe >> >> On Mon, Feb 11, 2013 at 11:21 AM, Max Woghiren wrote: >> > Hi everyone, >> > >> > I'm implementing Chrome's file system API using Cordova. On iOS, this >> uses >> > the Camera API. However, on Android, Camera isn't sufficient since we >> can >> > access more than just images and videos, so I need a more general file >> > chooser. It would be very similar to what exists in >> > CameraLauncher.getImage, but with a broader intent type (ie. MIME type). >> > >> > Does something like this already exist? If not, is something like this >> > valuable in core cordova or as a plugin? Is there an >> alternative/superior >> > approach? >> > >> > Thanks! >> > -Max >>