Android Question Sending email and tracking responses with SMTP from Net [lib]

AscySoft

Active Member
Licensed User
Hi.
I need to capture some shots on the go and send them to some predefined email addresses.
After a file(picture file) is created I need to send an info email on a yahoo address with description etc and another email to a gmail account with attachment.
So when a picture is taken, 2 mails are created and are sended one after another.

After that I want to delete files that were successfully sended, but I don't know hot to do that.
The SMTP.MessageSent is tracking only the status of a (I should say last?) email sent.
Imagine if user is trying to take 5 photos one after another(10 emails). Emails with pictures will go less slower than the rest of them, and with 3G even slower.

How do I know which picture was successful sended and which is pending or something else?
 

AscySoft

Active Member
Licensed User
Clever. I will try that. Thanks.
I am very tired with my first newborn son. I don't sleep to well/ I will post when I can.
BTW. Do you think that it is better to store all files in a list and send them all together?
Another thing: on point 3, what if message was failed, do you thing I should retry sending again and again the same mail?
 

AscySoft

Active Member
Licensed User
Tip: Call Service.StartForeground and stop it when you finish sending the messages.
I actually start it when my app was first lounch with StartService and in service if it fails (by various reasons, no data files to send, no data connection etc) restart it with StartServiceAt... but thanks for the tip.
One quick question: lets say some user connect his device to a computer (usual check for new data, push data, copy data etc, and sometimes update the app using a adb command)
I was not able to test (yet) if adb - install -r ...apk will throw error if in that particular moment the service is running. Do you have a clue/advice?
Thanks very much.
 
Last edited:
Top