-3

How to check for e-mails from an IntentService on an Android device?
Is there any library?
I googled a lot for this, but i can't find the solution.

Phoenix
  • 181
  • 3
  • 13

2 Answers2

0

There is no system API to check for email.

Email is handled by an individual app, which can be GMail, K-9 Mail, built-in email app etc.

None of them allow to read emails programmatically, because this would be a huge security hole.

The only two things you can do is to show 'New mail' dialog in Gmail with pre-filled text and address, and force account sync, which should force GMail to check for new mail immediately: Android how to enable/disable auto sync programmatically

pelya
  • 4,326
  • 2
  • 24
  • 23
0

Found out the solution: javaee.github.io/javamail/#JavaMail_for_Android

Phoenix
  • 181
  • 3
  • 13