Kirthi35
Kirthi35

Reputation: 185

Opening Native File Browser in android using the cordova

I am using the cordova 3.4.0 and trying to upload a file, using the file transfer and file api plugins given by cordova, but i am not able to open the file browser window, in order to select the file to upload. How do i open the file browser window in android using the corodva

Upvotes: 1

Views: 1929

Answers (1)

user3704578
user3704578

Reputation: 256

I used an Input tag in my html, like so:

<input type='file' id='fileInput'>

And then when it is clicked on the Android device, I get a pop-up asking me which file browser I want to use. My Galaxy S3 gives me seven choices (one of which is a downloaded app), and the Panasonic ToughPad I'm developing for gives me three (one of which is the same downloaded app I have on the phone).

I do not know if it is possible to get it to automatically select one in particular - for me, choosing a file manually is supposed to be a temporary need, as eventually the app is supposed to load specific files automatically.

Upvotes: 1

Related Questions