Best way to receive images uploaded by a user on Android app? - java

I'm working on an app that lets users submit orders, and also make custom orders where they upload an image. I then want to receive all this information by email. Initially, I was using JavaMail API with Gmail, but I heard that it can cause a blocking of the account due to "Suspicious Activity". Apparently a way around this is to use the Amazon SES SMTP server, but with that I cannot seem to find any documentation whatsoever on sending emails with attachments for Android (there is one but it's for general Java and it does not work on Android).
There must be a better way to to do this, I'm just not sure where to start looking. This is my first dev project (I'm in my 2nd year of computer science), so I'm pretty green with this stuff. If someone could point me in the right direction I would be so grateful. I'm open to learning new things, I'm just not even sure about what I need to learn in the first place for this.

your email will be blocked if you are sending emails in huge amount like hundreds of email in a second if you are not sending email in such amount so don't worry about getting blocked and if you are sending in email in such amount then you can take external email service theirs a lot of marketing via email services i hope this might help

Related

Encrypting/hiding portions of the source code

I've made a simple mailing app that takes in email credentials and uses it to send emails of certain kinds to selected addresses. Problem is, I've had to input the credentials right into the code, so anyone who uses dex2jar can get the source code and get the email used for forwarding and easily make the app obsolete.
I imagine I'm not the only one facing this issue, so what are some ways to make my code secure?
No matter how good of a technique you use to hide the credentials, if it's in the code then it can always be found.
Instead of hard coding them in, you could perhaps let the user specify them when he starts the app? If that can't be avoided you could instead have a remote service that will do the sending and forward your request to that.
You can not both connect to an e-mail account and keep those same users out of said e-mail account. Consider using a hosted server as part of the project to securely connect to the e-mail account from the server level and process these e-mails remotely.

How to establish an automated email service for a website?

I seem to fail at googling this specific thing: Like almost every website I too want to provide an automated email service for stuff like "password reset" or "validate email" after user registration.
However, I have not really an idea how I would do that and/or where to start. There must be some fast, easy and cheap solutions out there since this is quite a common issue for websites and I do not intend to re-invent the wheel for this problem.
So: What do I have to do to get such an automated email service for my website that works with my domain of course and where can I get started?
I am aware that I can use e.g. JavaMail to send emails as I like but do I still have to do everything by hand here or can I use an existing service?
On my site, I custom built it. You send the email out with the "guid" for password resets and validate emails and then you handle that on your website when they click the links. I think doing it yourself will be just as easy as trying to use a third party imo. Setting up a mail server isn't that hard, it might seem daunting at first, but theirs plenty of good ones available without charge. Configuring it to send mail properly, takes a little work (A lot of it is configured out of the box), but an excellent resource you can use is Unlock The Inbox. Just go through the free resources on the left about all the different things to be aware of. Then you can hook in 3rd party email marketing campaign managers without cost as well like phplist. It will give you more flexibility over time.

Send forget password email

I have spent lot of time, but alas! I am stuck in this problem. I want to send email in background in android application but I can't find way, how can I do it. Please anybody tell me some way how can I send background email in android application for forget password.
I use a backend like Backendless that allow you to manage your users login, password recovery, register, etc..
Good API, easy to use and a great and growing community who can help you any time.

What is the established way to request data from an android device

I currently have an small application that I have been using to learn java/android programming. Right now I have a setup were the app on one phone sends a request (via sms) to another phone running the same app. The remote phone receives the request and sends back some info. Next I would like to try this from the web. Is there an established "best" way to to this?
I was thinking I would have a web server send requests to the device via google cloud messaging and then have the device return the data directly to the web server. (Not that I really know how to do any of that just yet).
I see that there is a google cloud messaging return path (send messages from the device to the google cloud server, but it seems very new, do I need something like that? The main thing I want is to be able to ask the phone to do something when I want, not have it poll to see if there is a request, or just periodically update some status.
UPDATE:
Thanks to the answers below for confirming to me that I was on the right track.
I now have some basic functionality.
I started out using this gcm android demo code
https://code.google.com/p/gcm/source/browse/#git%2Fgcm-client%2Fsrc%2Fcom%2Fgoogle%2Fandroid%2Fgcm%2Fdemo%2Fapp%253Fstate%253Dclosed
and this ruby gem
https://github.com/spacialdb/gcm/blob/master/README.md
between the above two I was able to send a message to my phone pretty easily.
To get the round trip working, I setup a very simple rails app on heroku.
I included a modified version of the sample code in the gcm gem in a controller and then used
HttpPatch (needed for rails 4) to send a post/patch from my phone to my web app, the controller then echoes the message back to my phone.
I guess it would be nice to get the two way gcm stuff to work, but I am not sure there are any gems that handle that, and I am not qualified to handle a task like that :)
I would say it's the right call: Google Cloud Messaging for Android
From the site Android Developer:
This could be a lightweight message telling your app there is new data
to be fetched from the server (for instance, a movie uploaded by a
friend), or it could be a message containing up to 4kb of payload data
(so apps like instant messaging can consume the message directly).
In this case you don't want to fetch data from the server but you want to send them.
You can send them in different ways. I would suggest, since you are learning, to try a RESTful solution using one of the implementation of JAX-RS.
As a short and direct answer for beginner : GCM (Google Cloud Messaging) would solve your issue. However, if your app turned out to be something bigger, other more technical and complicated solutions are present too.
see this link.

Allow Email Interaction - Java Server

First of all, this is a kinda broad question, and I believe it belongs partially on Serverfault also, so bear with me. I tried googling and searching here, but only found parts of this question but not the whole idea of it. Here goes:
My problem is:
Im writing a web application, and my server is Java. I want to add a feature where my users can do BY EMAIL some of the possible interactions they can already do on the interface. For this part I believe to setup a mail server (any server recommendations?), and from my Java app (Tomcat) connect to the mail server and read the emails via POP3 or something (any API recommendations?).
The tricky part is that I dont want to use a single email address for that purpose. I want, for example, that if my user Joe want to CREATE an object in my application, then he would send an email to joe#create.mydomain.com, if he would like to DELETE an object, he would send to joe#delete.mydomain.com. The possible actions are previously known and limited, of course (since I would have to mess with the DNS for that purpose). This is just an example, most likely I would have to "tokenize" the left part of the email address (before the #), or else any user would be able to create and delete other userĀ“s objects (since email is semi-anonymous).
And the extra-tricky part is that I already have an email server running on mydomain.com, for the corporate emails. How to make that all emails from the actions words ("subdomains"?) go to my "application email server" and those without action words go to my "corporate email server"?
I guess thats it!
Thanks all
Since you're already using Java, it sounds like Apache James might be a good fit for you.
It allows you to create Matchers and Mailets which pick out and process emails based on your defined criteria (which could be address based sender/receiver matching, subject lines, etc). The process could insert records into a database, invoke a web service, anything you want to write in Java.

Categories