PhoneGap - Take photo and send mail.


In this article I will teach how to take a photo using a mobile device and than send to any email.
I used as development environment and technologies:
  • Phonegap
  • JQuery Mobile
  • XCode
  • Plugin EmailComposer
You can find project's source in GitHub:

https://github.com/yaircarreno/SendMailWithPhoto

Some comments:

This project is based in the previous article: Phonegap - Create Template Project.

This solution uses the plugin EmailComposer that is available for Android and IOS, however if you use PhoneGapBuild this solution will not work because this plugin is not register in PhoneGap Build platform. You must generate .ipa and .apk for you distribution.

Other alternative to build a based-Phonegap application is to delegate the send mail function to SOA component like REST or Web service based SOAP.

The temporary location is different in Android and IOS, you will need this algorithm:


        var split = photo.split('/');
        var i;
        var fullpath = "";
        
        for (i = 3; i < split.length; i++){
            fullpath = fullpath + "/" +split[i];
        }


Previous
Next Post »
Thanks for your comment