doesn't work I have a small android mobile phone app. One button launches the sit...">

Phonegap 2.9 android - InAppBrowser - <input type = "file"> doesn't work

I have a small android mobile phone app.

One button launches the site I created with jQuery mobile 1.3.

I open the page using:

 websiteRef=window.open('https://'+webstage+'.mysite.org/mobile?language_id=2', '_blank', 'location=no' );

      

The site works fine. But when I click on one page that allows the file to be downloaded using the following markup:

 <input type="file" name="upload" value="file" data-inline="true" style="min-width:100px;"/>

      

This does not work. It doesn't even show the file selection dialog (gallery, etc.). The button is completely broken and unresponsive.

Opening the exact same page using the android internet browser is fine. On the same page, I can choose e. d. from gallery and other file selection and uploading methods.

Since this is an external website, all the links to the phone PLUGIN like Android File Uploader don't help for me.

+1


source to share


2 answers


Input type file is not supported by androids web browser (it works on iOS though). if you want to view your gallery you need to use the api ap to get the URI and then if you want to download it somewhere> use the api file .



+1


source


for media elements (like audio mp3), use cordova-pluin-mediapicker

window.plugins.mediapicker.getAudio(success,error,false,false," ");

function success(data)
{
  console.log(JSON.stringify(data));
}
function error(e)
{
  console.log(e);
}

      



more information here

https://github.com/an-rahulpandey/cordova-plugin-mediapicker

0


source







All Articles