don/cordova-filechooser

fileChooser is not defined

sm-tester opened this issue · 4 comments

Hi Don.
Why don't you explain how to declare fileChooser on JavaScript in readme? When I use this plugin appear following error:

04-04 13:33:04.382: I/chromium(21228): [INFO:CONSOLE(15)] "Uncaught ReferenceError: fileChooser is not defined", source: file:///android_asset/html/testing_kitkat2.html (15)

How I can declare instance FileChooser plugin in JavaScript?

don commented

The fileChooser variable is defined when the plugin is installed with the Cordova command line interface.

Make sure you are using Cordova 3.4.0.
Run jshint on your javascript file to make sure there are no errors.
Ensure that your Android build tools are up to date. (I'm running SDK Tools 22.6.1 and Platform Tools 19.0.1 and SDK Build Tool 19.0.1.)

I tested with Cordova 3.4 on a Nexus 5 (KitKat) and it worked OK. If those suggestions don't work, let me know and we'll try something else.

Hello sir.

Same issue for me with cordova 5.0.0 , please tell me how can solve this ?
Also please show the simple example to use this plugin ,
thank you in advance.

Hello Sir,

I am getting the same error. I am using cordova 6.3.1. I am injecting it directly in my controller and i am still getting the error. Can you please help me fix this?

I had the same issue - fileChooser not defined. In my case there was a problem with another plugin which stopped loading the following plugins listed in cordova_plugins.js.

I have moved the filechooser plugin in this file to the top and it started working.