cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Woghiren <m...@google.com>
Subject Re: Android file chooser
Date Tue, 12 Feb 2013 16:23:15 GMT
Just to be clear, I'm asking whether it would be useful to add a file
picker plugin for Android to core Cordova.


On Tue, Feb 12, 2013 at 10:49 AM, Max Woghiren <maxw@google.com> wrote:

> Thanks Simon.
>
> The file picker code in that project looks similar to what I was thinking
> might be useful to add to Cordova itself; however, in the Corinthian
> philosophy, you mention that this sort of thing isn't necessarily within
> the scope of Cordova.  Does that mean you believe this type of plugin is
> best kept within the projects using Cordova (eg. mobile Chrome apps) and
> augmenting libraries (eg. Corinthian)?
>
>
> On Mon, Feb 11, 2013 at 3:26 PM, Simon MacDonald <
> simon.macdonald@gmail.com> wrote:
>
>> 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 <maxw@google.com> wrote:
>> > You're right about the FileUtils API, but I need a Cordova File object
>> to
>> > access those methods.  <input type="file"> 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 <bowserj@gmail.com> 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 <input type="file">.
>> >>
>> >> Joe
>> >>
>> >> On Mon, Feb 11, 2013 at 11:21 AM, Max Woghiren <maxw@chromium.org>
>> 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
>> >>
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message