我添加了插件并添加了引用功能APPEmailComposer。但是,当我启动应用程序时没有任何反应。我是科尔多瓦的新手。
这是我的代码:
<body>
<script>
document.addEventListener('deviceready', OnDeviceReady, false);
function onDeviceReady() {
console.log ('Device is ready');
}
function initialize(){
cordova.plugins.email.isAvailable(
function (isAvailable) {
// alert('Service is not available') unless isAvailable;
}
);
cordova.plugins.email.open({
to: Array, // email addresses for TO field
cc: Array, // email addresses for CC field
bcc: Array, // email addresses for BCC field
attachments: Array, // file paths or base64 data streams
subject: String, // subject of the email
body: String = "1. Take Photo with Camera" + System.lineSeparator() + "2." +System.lineSeparator() + "3." // email body
isHtml: Boolean, // indicates if the body is HTML or plain text
}, callback, scope);
};
</script>
<button onclick ="initialize();"> Email </button>
</body>