-
Notifications
You must be signed in to change notification settings - Fork 27
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
cordova.plugins is undefined #17
Comments
Did you wait for |
yes. I added the plugin, then added this code on a button click event, so well after the deviceready fired... |
And you're running it in a webbrowser? |
Yes |
Browsers don't implement the Local Notification API so you really need to use a device / simulator. |
Incorrect. I am using the WebBrowser IDE to develop the app but testing Local Notification API on my device as I am well aware of this limitation. Nevertheless, during debugging I get cordova.plugins is undefined... Please do not close this ticket as I need HELP! |
I asked "And you're running it in a webbrowser?" and you said "Yes" so I think my respons was not incorrect. It's just that you thought I meant "IDE" whereas I meant "app". Share your app with me and I may take a look. |
This code has no method tied to a button and no active That being said the code looks reasonable to me. Do other plugins (like Toast which you've included as well) work? |
Thanks for that second question as Toast gives same error, plugin undefined. Notice that the cordova.plugins.notification.local.schedule is called in the app.js line 48. Check it out and you will see it is after deviceready... let me know your findings... |
@EddyVerbruggen any update on the file I shared with you? (Did you discover anything helpful?) |
I just added this plugin to my appbuilder web ide project and tried to simply use
//cordova.plugins.notification.local.schedule({ // id: 1, // title: 'I will bother you every minute', // text: '.. until you cancel all notifications', // sound: null, // every: 'minute', // autoClear: false, // at: new Date(new Date().getTime() + 10 * 1000) //});
and I get the error above.
The text was updated successfully, but these errors were encountered: