Nic Roche
Nic Roche

Reputation: 96

mobile-chrome-apps using cordova plugin

I'm trying to get a polyfill for the issue with input[type=file] on Android 4.4.

chrome.fileSystem.chooseEntry shows the dialog but not the callback.

Anyhow this look(s)/(ed) promising:

https://github.com/cdibened/filechooser

but using the "cca plugin add..." instead of "cordova plugin add..." fails.

Other posts recommend doing everything through the cca toolchain.

What is the best approach?

What are other developers doing about the issue with input[type=file] on Android 4.4?

Thanks, Nic

Upvotes: 2

Views: 586

Answers (1)

mmocny
mmocny

Reputation: 8855

cca plugin add forwards off to cordova plugin add, making sure that the paths, versions, etc are correct, so you were right to use that.

The reason this plugin fails to install is because it is bundling the android-support-v4.jar library, which we already also install.

The resolution is simple: all plugins should not bundle external libraries, and should instead use a plugin.xml <dependency> tag on a single common plugin to add these external libraries.

We provide a bunch of these plugins for Google libraries, including for android-support-v4.

I've filed an issue for us to better handle this error, but the resolution is to reach out to that plugin author and make the change, or fork fix and issue a pull request.

If you are not able to do this, let me know and I will add it to our backlog!

Upvotes: 2

Related Questions