Android Question Create email when not connected without using intent

Richard O'Sullivan

Member
Licensed User
Hi all,

I have an app that collects data on a tablet - no phone. It will be used mainly without Wifi access except for short periods when back at base. I would ideally like to transmit the data to a server at that time. I've tried to create emails but they go nowhere when not in Wifi connection. Can they be queued in a local email client?
I don't want to have the user to interact with the Email client to press a send button.

I can check for internet using WaitForInternet but what is best way to launch this so that it operates as a background service?

All suggestions greatly appreciated.

Richard
 

DonManfred

Expert
Licensed User
Longtime User
Can they be queued in a local email client?
Not that i know of.
You can save them into a local database and when internet is available you send them using your own SMTP-Server. NO INTERACTION is needed here. But it uses YOUR emailaccount and you need to have the credentials within your app code.
 
Upvote 0

Richard O'Sullivan

Member
Licensed User
Thanks Don.

The data is in a database and I have no issue with email credentials in the app.

In b4A do I launch the waitforinternet as a service? and will is stay operating all through the day waiting for the time when Wifi is available.
I will also be tracking Geo-coords and someone made the suggestion that co-ords of the Wifi location may be checked to see how close they are to having wifi available.

Richard
 
Upvote 0
Top