0

It is possible to detect if I receive an email from gmail in my device catching an intent for example with a receiver ?

I try this but it seem not working :

contentResolver.registerContentObserver(Uri.parse("content://gmail-ls"), true, gmailObserver);
Jéwôm'
  • 3,753
  • 5
  • 40
  • 73
  • Do you only want to "detect" the arrival of the e-mail, or do you want to read the whole e-mail? – pri Mar 06 '18 at 18:59
  • Just detect the arrival of the email – Jéwôm' Mar 06 '18 at 18:59
  • Did you try NotificationListenerService? https://stackoverflow.com/questions/27499588/detect-incoming-email-notification-in-android – pri Mar 06 '18 at 19:00
  • Possible duplicate of [In Android app can I listen for emails that arrive in GMAIL?](https://stackoverflow.com/questions/18434889/in-android-app-can-i-listen-for-emails-that-arrive-in-gmail) – Alex Mar 06 '18 at 19:18

0 Answers0