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

Cesidio DiBenedetto commented on CB-5294:
-----------------------------------------

Hey all, I've been experiencing this issue as well so I wrote a Cordova 
FileChooser plugin to a "band-aid" for the time being.  Basically, in Android 
4.4(KitKat), as mentioned in previous comments, the file dialog is not opened. 
However the onclick event is still fired on <input type=file> so you can call 
the FileChooser plugin to open a file dialog and upon selection, you can set a 
variable that contains the full path to the file.  At this point, you can use 
the FileTransfer plugin to upload to your server and hook into the onprogress 
event to show progress. This plugin is mainly configured for Android 4.4 so I 
would recommend to continue to use the native file dialogs for earlier versions 
of Android.  There might be issues with the plugin as I have not fully tested 
all possible scenarios on many devices, but I have installed it on a Nexus 5 
and it worked fine.

https://github.com/cdibened/filechooser

> File input element not opening file picker in Android 4.4
> ---------------------------------------------------------
>
>                 Key: CB-5294
>                 URL: https://issues.apache.org/jira/browse/CB-5294
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.1.0
>         Environment: Android 4.4 (emulator and Nexus 5)
>            Reporter: Paul Kane
>            Assignee: Joe Bowser
>
> The file input field doesn't respond when clicked/tapped in Android 4.4. 
> Works fine in previous Android versions. This is regardless of whether the 
> Target Level is set to 18 or 19.
> To reproduce, I created a fresh Cordova 3.1.0 project for Android. The only 
> modification I made to the default (placeholder) index.html file was adding a 
> <form> element with a single <input type="file"> element inside. Clicking the 
> "Choose File" button does nothing. No Logcat output or errors. Normally at 
> this point a dialogue would open allowing me to select an image from the 
> gallery or take a picture, which is what happens in older Android versions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to