Android Question Turn-based game using pop3 communication - how to ?

semar

Active Member
Licensed User
Longtime User
Dear all,
I've read this (quite old) b4x-post which is very interesting about comunication between android devices :
I've then created a gmail account, downloaded the code posted by Erel, done the necessary modification, and on the gmail side I have activated pop3 and imap.
Sadly, it does not work as expected.
If I use this statement:
pop.Initialize("pop.gmail.com", 995, "[email protected]", "myPwd", "pop")
I get this error:
java.lang.RuntimeException: Error during login: -ERR [AUTH] Username and password not accepted.

If I use however:
pop.Initialize("imap.gmail.com", 993, "[email protected]", "myPwd", "pop")
I get this error:
org.apache.commons.net.MalformedServerReplyException: Received invalid POP3 protocol response from server.* OK Gimap ready for requests from 2001:9e8:e5e2:3e00:8c13:4137:80d4:6e5d m23mb120279042wrb

Hence the question: is this method (using pop3 or imap) still a working method to read and write emails from within an android device, or is obsolete ?
In other terms, is there a way to communicate between android devices using e-mail ? If the answer is yes, has anyone a working example I could use as reference ?

Thanks in advance for your attention and have a nice 1st May :)
Sergio
 

drgottjr

Expert
Licensed User
Longtime User
pop3 can only receive email, not send it. so, assuming you can get gmail to
allow you to receive email using pop3 or imail, you still have the problem of
sending messages. for that you need smtp.

getting gmail to go along with your scheme may no longer be doable. i don't use
the service myself, so i thought i would try just to see what the latest obstacles
might be. i did not receive the same error messages as you, but it looks like you
may need 2-factor authorization before google will let you do it. (not to mention that
sending and receiving email has already been available for some time, so
it's not clear exactly what your app's added value would be. i'm guessing
some kind of "chat", perhaps).

in any case, while gmail may no longer work, there is nothing stopping you (and
your fellow users) from opening an email account on some server which accepts pop3.
just because you're using android doesn't limit you to gmail. the net library does work
in this regard. and, by the way, the net library can also handle sending email, but you need
an smtp server (which will not be gmail).

note: reading (that is, parsing) email is not a trivial task. you would, to all intents and
purposes, be limited to simple text messages (that could include base64 "encoding"
if you thought that would deter snooping, a la telegram. not. :))
 
Upvote 0
Top