Reputation: 1113
Hy everyone, my android app can send automatically emails (without connecting to gmail client).
My problem is that when internet is not available i need a way to save the unsent email as a draft in order to send it later. I dont know acutally how to do that, do you have any ideas?
I was thinking about opening the gmail client with the unsent email and save it there as a draft but it looks very uncomfortable. Is there a way to do it automatically?
thanks
Upvotes: 1
Views: 843
Reputation: 1007265
I dont know acutally how to do that, do you have any ideas?
Write it to a file or database in your app, then allow the user some means through your UI to send it later.
I was thinking about opening the gmail client with the unsent email and save it there as a draft but it looks very uncomfortable.
You have no way of forcing the user to save the message as a draft or do anything with the message at all if you use ACTION_SEND
or ACTION_SENDTO
.
Is there a way to do it automatically?
Email programs are applications. There are hundreds of them for Android. You are welcome to try finding them all, then ask each of their developers if they offer an API, and if that API supports "draft unsent emails". Neither Gmail nor the AOSP Email app have a documented and supported API that that offers "draft unsent emails".
Upvotes: 1