Search code examples
javaandroidgmailimapjakarta-mail

How to detect message threads using JavaMail on Android?


I'm writing an email client for Android using the javamail-android library. I would like to detect Gmail threads to be able to display all messages from one thread together. I'd rather not download all messages in the inbox folder though. What I want is to display only recent messages/threads. How can I do it and do I have to use external libraries for this?

I managed to find java-gmail-imap which seems to be doing what I want. Does anyone have any experience with it and/or can suggest possible alternatives?


Solution

  • For Android, you can use my port here. I have used it for a project successfully, I just replaced the java dependencies with Harmony implementations and turn it in a Android library project to make sure one is not using anything that isn't supported. You can make a jar out of it (which I should :P ).