-
Notifications
You must be signed in to change notification settings - Fork 334
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
Does it work with Android Phonegap 3.3.0 ? #9
Comments
You lead the plugin in the wrong way. Do not lead the plugins directly. |
Thanks for your reply. Can you tell me what I did wrong? I checked file cordova_plugins.js and see nothing reference to your email composer, here is the code I got:
Should I modify this file to make it work? what should I write in here? Thanks |
Please use the following steps:
|
I found the bug. Your instruction says call the javascript like this: window.plugin.email.open(); This is wrong for me, and to make it works I have to remove "email", this is the code works for me window.plugin.open(); Hope this help someone. |
Thanks @kardin .. Im using Cordova 3.1.0, window.plugin.open(); works for me.. :) |
I created new Android project with phonegap 3.3.0 using the cmd interface. I can run the phonegap on my android phone. Tried to follow your instruction to install the plugin email composer but I every time I run the code window.plugin.email.open(); I got this error
Uncaught TypeError: Cannot call method 'open' of undefined:43
Below is my index.html
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<body>
<div class="app" onclick="emailme();">
<h1>Apache Cordova</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/email_composer.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
function emailme(){
window.plugin.email.open();
}
</script>
</body>
</html>
email_composer.js already put inside "js" folder
What should I do ?
Thanks
The text was updated successfully, but these errors were encountered: