cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niklas Merz (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-2627) HTML File Input should support accept/source attributes
Date Fri, 07 Apr 2017 20:36:42 GMT

    [ https://issues.apache.org/jira/browse/CB-2627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961199#comment-15961199
] 

Niklas Merz edited comment on CB-2627 at 4/7/17 8:36 PM:
---------------------------------------------------------

The file chooser is created by:

{code:title=SystemWebChromeClient.java|borderStyle=solid}
Intent uploadIntent = fileChooserParams.createIntent();
{code}

>From Android docs:
{quote}
createIntent
added in API level 21

Intent createIntent ()

Creates an intent that would start a file picker for file selection. The Intent supports choosing
files from simple file sources available on the device. Some advanced sources (for example,
live media capture) may not be supported and applications wishing to support these sources
or more advanced file operations should build their own Intent. 
{quote}

Android WebChromeClient seems to open file upload all the time.



was (Author: niklasmerz):
The file chooser is created by:

{code:title=SystemWebChromeClient.java|borderStyle=solid}
Intent uploadIntent = fileChooserParams.createIntent();
{code}

>From Android docs:
{quote}
createIntent
added in API level 21

Intent createIntent ()

Creates an intent that would start a file picker for file selection. The Intent supports choosing
files from simple file sources available on the device. Some advanced sources (for example,
live media capture) may not be supported and applications wishing to support these sources
or more advanced file operations should build their own Intent. 
{quote}

I am trying to add itents depending on capture attributes now.


> HTML File Input should support accept/source attributes
> -------------------------------------------------------
>
>                 Key: CB-2627
>                 URL: https://issues.apache.org/jira/browse/CB-2627
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Michael Migdol
>            Priority: Minor
>
> [CB-2086] always opens a generic File Picker, regardless of the values passed in for
the mimetypes in the accept attribute, or the source attribute.  The Android Browser correctly
examines these attributes and starts up an activity with either: a camera intent, a camera/image
intent, a camcorder intent, a sound recorder intent, or a sound recorder/audio intent.  
> I'm not sure what cross-pollination is allowed between the Android codebase and Cordova's,
but it appears that packages/apps/Browser/src/com/android/browser/UploadHandler.java from
the Android source tree contains exactly what we need to accomplish the same.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message