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.