如何从我的Gmail帐户接收推送通知? [英] How to receive push notifications from my Gmail account?

查看:459
本文介绍了如何从我的Gmail帐户接收推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个监控邮箱的应用程序(最好是Gmail邮箱)。简而言之,我的问题是如何收听电子邮件?我可以永远不断拉电子邮件,但恐怕这样做不够好。

I'd like to write an application which monitors a mailbox (ideally a Gmail mailbox). In brief, my question is how do I listen to incoming emails? I could always keep pulling emails but I am afraid that this doesn't scale very well.

iOS如何使用Gmail?我认为他们正在使用Exchange协议,但我不确定。有没有人有这样做的想法?有没有解决方案已经做了类似的事情?我只需要一个钩子。

How does iOS do it with Gmail? I think they are using Exchange protocol, but I am not sure. Does anybody have an idea on how to do it? Is there a solution which already does something similar? I just need a hook.

谢谢!

推荐答案

用于监控Gmail或Google Apps收件箱的通用API是IMAP协议。有关这方面的一些信息:
桌面客户端的Gmail IMAP OAuth

The most universal "API" for monitoring a Gmail or Google Apps inbox is the IMAP protocol. There's some information about this here: Gmail IMAP OAuth for desktop clients

对于Google Apps收件箱(不是一般消费者Gmail帐户),您还可以使用Gmail收件箱Feed,其中提供了Google Apps中未读邮件的AtomPub XML Feed收件箱:
http://code.google.com/apis/ gmail / docs / inbox_feed.html

For Google Apps inboxes (not general consumer Gmail accounts), you can also use the Gmail Inbox Feed, which provides an AtomPub XML feed of unread messages in a Google Apps inbox: http://code.google.com/apis/gmail/docs/inbox_feed.html

这篇关于如何从我的Gmail帐户接收推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆