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
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.
Related
I'm using WordPress and Contact Form 7 plugin on this page. There is a file upload field, it's simple and valid HTML:
<input type="file" name="your-cv" size="40" class="wpcf7-form-control wpcf7-file wpcf7-validates-as-required" accept=".doc,.docx,.pdf" aria-required="true" aria-invalid="false">
The form works perfectly on desktop, iOS, but Android users can’t use file upload. They just cannot choose a file with “file chooser” on android. After they click on “file picker”, android dialogue window with “no apps can perform this action” text will appear.
android screenshot
How can I solve this? Users reported, that they don't have such problem on other websites.
Thanks.
I am creating a hybrid app using cordova version 6.3 . On Android, I would like to the user to select a file from their device. Basically, i want a file chooser to show up and then the user select a file that is store on the android phone.
The current input type="file" does not work. It did work with a different version of SDK(19) and cordova
Can you give me some hint or some some sample code showing how I can implement this feature
The <input type="file"> element also doesn't work as you'd expect in iOS -- it displays a list of photos IIRC.
I ended up writing my own routine to iterate through the phone's directories (using the plugin cordova-plugin-file) and gather the files -- see https://stackoverflow.com/a/29905718/346550. After getting the list, I display the entries in an unordered list of hyperlinks. You could really display the file results however you wanted, though.
How can we display PDF Files on BB/iOS/Android and Windows phone by using MobileFirst (MobileFirst Studio) ? These PDF actually exists in DB as binary files.
Is there any API given by IBM?
MobileFirst does not (and should not) provide API to display a PDF file.
I am not sure this will possible in BlackBerry, but you can google for BlackBerry API or Cordova API to display it.
As for Windows Phone it seems that if you will provide a direct URL to the PDF file the default PDF reader should be able to display it, according to: Opening a PDF file in Windows Phone - so that means you can use the window.open JS API to open the URL to the PDF file.
I am developing an web+cross platform app using Jquery Mobile+PhoneGap+Android. In web app, I am able to open pdf file links within my app page using iframe. But, in Phonegap generated Android build, iframe is unable to render pdf content,it is showing that iframe area as empty.How can I display the pdf file/content, whose src I know at runtime, within android webview. Thanks In Advance.
I've just published my plugin, which can open almost any type of file, which is stored locally on Android device.
Please take a look at: https://github.com/markeeftb/FileOpener
Plugin opens external application which handles the preview of the document.
I write an android application based on Cordova and JQuery Mobile. I have to open a picture from SD card of the device. The user has to pick it.
Is there a way to use a file open dialog in android from HTML based applications? The application is a port from blackberry (WebWorks). On this system I had to write my own extension. I don't think Cordova brings us this fileopendialog. But maybe there is a solution to create a plugin like in webworks.
You can select a Image from the image library:
http://docs.phonegap.com/en/2.0.0/cordova_camera_camera.md.html#camera.getPicture
This works directly with android. If it is a file from Filesystem:
http://docs.phonegap.com/en/2.0.0/cordova_file_file.md.html#File
But this will not create a Fileseletion Dialog. This hast to be implemented within the javascript.