Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhoneGap Email Plugin

I am trying to use the plugin here This is the first time I have started to use Phonegap in Android, so the process is a little unfamiliar to me.

So far I have added the .JAVA file to here "src.org.apache.cordova" I have added the .JS to the www folder and have referenced it in my HTML file.

I have added the following to my config.xml

<plugin name="EmailComposer" value="org.apache.cordova.emailComposer"/>

As the README file does not really go into specifics, I am assuming this is the value that must go in here.

I then use the following in my HTML file.

window.plugins.emailComposer.showEmailComposerWithCallback(null,"Look at this photo","Take a look at <b>this<b/>:",["[email protected]", "[email protected]"],[],[],true,["_complete_path/image.jpg", "_other_complete_path/file.zip"]);

This is straight from the README file, nothing happens when I run the application. Not even an error.

I have tried using various versions in the emulator and on a Samsung S2 running 4.0.3

Phonegap version 2.7

Can anyone point me in the right direction?

Thanks

like image 588
Rory Standley Avatar asked Jun 25 '13 21:06

Rory Standley


1 Answers

The mail plugin from katzer works like a charm.

Use cordova plugin add [email protected] to add install it locally.

If you are using PhoneGap Build, don't forget to add the following line to the config.xml

<gap:plugin name="cordova-plugin-email-composer" version="0.8.3" source="npm" />

like image 83
tottomotto Avatar answered Nov 04 '22 10:11

tottomotto