Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesnt works in my project #1

Open
renatosousafilho opened this issue Nov 27, 2012 · 1 comment
Open

Plugin doesnt works in my project #1

renatosousafilho opened this issue Nov 27, 2012 · 1 comment

Comments

@renatosousafilho
Copy link

Hi guy, I has been try to using this plugin, but I have a problem, I follow all of instructions, download the js file and the class, write the permissions and plugins in the configuration files, but the plugin. doesnt works, the console show the following message:

11-27 20:07:46.376: E/Web Console(327): TypeError: Result of expression 'window.plugins.AccountList' [undefined] is not an object. at file:///android_asset/www/js/main.js:114

I really don't understand what it causes this erros. I've been using another phonegap plugin, the barcode scanner and ir works perfectly. I compared the plugins and realized that the plugin Barcode scan uses a call through the command cordova.exec(), while, the accounlistplugin uses Phonegap.exec. Try to use the cordova.exec, but it doesn't work too. I want to know How can i solve this problem?

@hanneskl
Copy link

Find the problem:
Replace the last function in js with
if(!window.plugins) {
window.plugins = {};
}

if (!window.plugins.accountList) {
window.plugins.accountList = new AccountList();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants