katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.56k stars 1.75k forks source link

[Issues] Module is not defined at file #145

Closed dungntd closed 10 years ago

dungntd commented 10 years ago

Hi all !

I'm current using LocalNotification with Phonegap 2.9.0 in android app. I'm config and copy fix same help in readme.md . I have an issues ( show in console Eclipse ):

"Uncaught ReferenceError: module is not defined at file:///android_asset/www/local-notification.js:233"

I'm find line 233 : module.exports = plugin;

Please support me ? Sorry, i'm poor English :(

Please send me a project template in android to: dungntd@outlook.com !

Thank All !

katzer commented 10 years ago

Hello,

I am not sure if it works with Cordova 2.9. Anyway since you have to install the plugin manually, add the following code to the local-notification.js file:

cordova.define("de.appplant.cordova.plugin.local-notification.LocalNotification", function(require, exports, module) {
   // insert local-notification.js content
})
dungntd commented 10 years ago

@katzer

Thank ! it try it but i have an error: Cannot read property "notification" of undefine.

I think "window.plugin.notification" not define in my project. I have sent my project to you via mail. Does it not support Phonegap 2.9.0 ?

dungntd commented 10 years ago

I'll upgare my app to Cordova 3.4.0 !

Thank for support !

katzer commented 10 years ago

Does it not support Phonegap 2.9.0?

Yes, it supports cordova 3 and above. See https://github.com/katzer/cordova-plugin-local-notifications#installation for how to install it.

dungntd commented 10 years ago

This plugin run so good in Cordova 3.4.0. I try it in iOS and android success but have some minor issues with WP8. Thank for support !

katzer commented 10 years ago

Yes, WP8 support is "limited" for the moment.