I’m starting with Ionic and I’m just amazed on how awesome this framework is! So first, good job and thanks!
What I want: I’m developing an ionic android (plan to move to others platforms later) app which will simple take or select a picture and send it to an e-mail address along with some fields. As far as my research went, I couldn’t find a cordova plugin to send e-mails without the user having to interact with it. There’s plugins for this but all of them open the “native” e-mail client which is not what I want.
My Plan: So my idea was to build a Java class to send the e-mail in a “silent” and transparent way for the user. (I’m aware that I will need to use a fixed e-mail address, that’s Ok for now). I worked with Phonegap once and I’m kind of familiar on how to create a plugin, but how about Ionic? It seems to me that theres not much information around this subject.
My question: I already created the UI and everything works great. I’m using the command-line for everything (build, emulate, run) and I pretend to continue doing because it is just so easy. So now I want to start building the plugin, and I’m wondering, how do I do it?
- Do I have to do it in a separeted android project, then “install it” like a normal plugin?
- Do I have to import my Ionic Android project to Eclipse and start working there?
- If I do the above, when I execute : Ionic build android, wouldn’t I lose everything I did in the Android platform folder?
Sorry for the long post, but if anyone can clear things up and provide some guidance, man, that would be great!
Edit: I know that having a back-end infrastructure to send the e-mails would be better, but this is not the point of my question as the client doesn’t want to pay for a host/storage/domain and etc.