Closed manorius closed 10 years ago
Hello,
sounds like email_composer.js is loaded before cordova.js.
That's weird... because I'm loading the cordova plugin first and then the email_composer.js script
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>
<script type="text/javascript" src="js/jquery.tap.min.js"></script>
<script type="text/javascript" src="js/color-thief.js"></script>
<script type="text/javascript" src="js/mustache.js"></script>
<script type="text/javascript" src="js/templates.js"></script>
<script type="text/javascript" src="js/email_composer.js"></script>
<script type="text/javascript" src="js/index.js"></script>
Usually there is no need to load the plugins by self. cordova.js
loads cordova_plugins.js
where all plugins and meta informations are listed. If cordova is ready and the module
object is present, it will load all plugins.
Even if I remove the email_composer.js script I get the bellow errors:
11-15 11:31:23.093: I/chromium(3704): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported 11-15 11:31:23.133: I/chromium(3704): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported 11-15 11:31:26.253: I/chromium(3704): [INFO:CONSOLE(1031)] "processMessage failed: Message: S01 EmailComposer1237384004 t", source: file:///android_asset/www/cordova.js (1031) 11-15 11:31:26.253: I/chromium(3704): [INFO:CONSOLE(1032)] "processMessage failed: Error: ReferenceError: isavailable is not defined", source: file:///android_asset/www/cordova.js (1032) 11-15 11:31:26.253: I/chromium(3704): [INFO:CONSOLE(1033)] "processMessage failed: Stack: ReferenceError: isavailable is not defined 11-15 11:31:26.253: I/chromium(3704): at file:///android_asset/www/js/index.js:59:15 11-15 11:31:26.253: I/chromium(3704): at callbackFn (file:///android_asset/www/plugins/de.appplant.cordova.plugin.email-composer/www/email_composer.js:41:13) 11-15 11:31:26.253: I/chromium(3704): at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:289:54) 11-15 11:31:26.253: I/chromium(3704): at processMessage (file:///android_asset/www/cordova.js:1026:21) 11-15 11:31:26.253: I/chromium(3704): at Function.androidExec.processMessages (file:///android_asset/www/cordova.js:1060:13) 11-15 11:31:26.253: I/chromium(3704): at Object.androidExec as exec 11-15 11:31:26.253: I/chromium(3704): at Object.EmailComposer.isServiceAvailable (file:///android_asset/www/plugins/de.appplant.cordova.plugin.email-composer/www/email_composer.js:44:14) 11-15 11:31:26.253: I/chromium(3704): at HTMLImageElement.app.takePicture (file:///android_asset/www/js/index.js:57:29) 11-15 11:31:26.253: I/chromium(3704): at HTMLDivElement.b.event.dispatch (file:///android_asset/www/js/jquery-1.9.1.min.js:3:28337) 11-15 11:31:26.253: I/chromium(3704): at HTMLDivElement.v.handle (file:///android_asset/www/js/jquery-1.9.1.min.js:3:25042)", source: file:///android_asset/www/cordova.js (1033)
Are you sure that you have removed the email_composer.js
? Because the script is part of the stack?
11-15 11:31:26.253: I/chromium(3704): at callbackFn (file:///android_asset/www/plugins/de.appplant.cordova.plugin.email-composer/www/_email_composer.js_:41:13)
The stack looks like that you try to reference the variable isavailable
in your callback function, which is not defined.
11-15 11:31:26.253: I/chromium(3704): [INFO:CONSOLE(1033)] "processMessage failed: Stack: ReferenceError: _isavailable_ is not defined 11-15 11:31:26.253: I/chromium(3704): at file:///android_asset/www/js/index.js:59:15
I had this same problem. All I had to do was include the following in my root www index.html: `
` Now you may not have these files in your ROOT WWW, but when you build the application, node will attach the correct files to the platform your using.
Hi,
I've installed the plugin on cordova 3.1 and I'm getting the following 2 errors whenever I'm trying to use it.
When I load the app to my android device: 11-08 15:47:25.689: E/Web Console(29177): Uncaught ReferenceError: module is not defined at file:///android_asset/www/js/email_composer.js:51
When I invoke window.plugin.email.open 11-08 15:54:07.348: E/Web Console(29177): Uncaught TypeError: Converting circular structure to JSON at file:///android_asset/www/cordova.js:901
Any help is highly appreciated. Thanks