Search code examples
gmail

Push notification for new gmail


I used oauth2 to login gmail account and get inbox mail successfully. But my mail client app (on iOS) cannot push notification when someone send me an email. Can anyone tell me some Google API or the way to do that? Thanks,


Solution

  • Unfortunately there currently is no mechanism to receive updates automatically when new mail arrives. I would recommend logging an enhancement request for push notification support in the Gmail API in the Apps API issue tracker. In lieu of this, you can minimize resource utilization by only doing a full sync once, and then keeping track of the history id and doing only partial syncs from that point.