Reputation: 2001
Why is it so hard to find an Android example of sending email using Oauth and Google Mail?
I am new to Java and Android and am having a hard time working this out. It is possible?
I have found this Gmail (or POP3) library for Android development
Which links to this http://code.google.com/apis/gmail/oauth/code.html
But no working Android examples to be found anywhere.
I would this this is possible. I have an app that sends email from the users Gmail account using this code
http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_(no_Intents)_in_Android
But my users do not like to enter their Google password in my app. And I don't blame them. In this day and age you would think that there would be an easy solution with many examples.
So, are there examples out there and I am just missing them?
TIA
Upvotes: 2
Views: 6925
Reputation: 4074
XOAUTH and Android with source code:
Implementing SMTP or IMAP XOAuth
HTH
Upvotes: 3
Reputation: 2238
I actually asked if there was a "production quality" OAuth implementation around in another question:
Is there a production quality OAuth sample for Android?
Looks like that example I linked to is the best that's floating around. I've ended up having to tweek it a bit to make it really work as expected (have the back button work as expected for example). The best technique I've been able to dig up so far is to have the activity which launches the OAuth activity set as singleTask, and when you swap back to it from the OAuth activity set the FLAG_ACTIVITY_CLEAR_TOP flag in the intent.
Upvotes: 0