I would like to explain me better. In android once you receive an email on gmail you would get notified almost in realtime. How does it work?
Thinking about an answer i had 1 idea:
Android is connected to a gmail server which does not send anything untill it has new mails
This solution , which is the only one i can think about, is a little bit expensive, in term of battery consumption.
Do you have further ideas ?
If not do you know some opensource server that will accomplish my idea ?
Bests, Andrea