I read notification from a gmail client. But i don't know if ia have a way to receive a notification from google mail directly.
Are a way, library or example?
i don´t know there exists such a feature.... I never saw a library for it.
GMail is regularly checking your inbox and showing a notification if there is a new mail.
Gmail does support 3rd party POP3 (https://tools.ietf.org/html/rfc1081), you need to enable it in your Gmail settings (under something like "allow less secure apps" or something like that).
You can use the Net library to read Gmail mails or a solution based on the web service they provide. I meant that the Gmail app or the standard mail client do not send any intents.
Thanks 2all.
Working with " You can use NotificationListener to monitor all notifications." fine.
When finish i publish the source. Are trick's but (sometime) work. For a reason i don't know my mail client (Aquamail) stop the service.
I test native gmail client. And share the experience.