如何监听电子邮件 [英] How to listen for email messages

查看:183
本文介绍了如何监听电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来侦听传入/传出的电子邮件,或直接进入收件箱?

Is there a way to listen for incoming/outgoing email messages or access the inbox directly?

我看了,既然没有默认邮件客户端在Android SDK是不可能的,除非在手机上使用的客户端实现了一些自定义的机制。这仍然是这样吗?

I read that since there is no default mail client in the Android SDK it is not possible unless the client used on the phone implements some custom mechanisms. Is this still the case?

推荐答案

电子邮件不是Android操作系统,所以你不能codeA全球广播接收器(就像你会为接收到的SMS)的一部分。最明显的解决方法是$ C C广播接收机$为顶的X And​​roid操作系统上最流行的电子邮件客户端里面做广播传入电子邮件。

Emails are not part of the Android OS so you cannot code a global Broadcast Receiver (like you would for incoming SMS). The obvious workaround is to code Broadcast Receivers for the top X most popular email clients on Android OS which do broadcast incoming emails.

K9确实给你注册的广播接收传入电子邮件的灵​​活性 - 见的https:/ /github.com/k9mail/k-9/wiki/Intents

K9 does give you the flexibility of registering Broadcast Receivers for incoming emails - see https://github.com/k9mail/k-9/wiki/Intents.

Gmail中没有任何正式的/记录,用于接收有关传入电子邮件信息的API。但是直到前阵子,你可以利用内容观察员监测变化到Gmail。我相信,这将不再有效,但。

Gmail does not have any official / documented API for receiving info about incoming emails. But until a while back, you could make use of Content Observers for monitoring changes to Gmail. I believe this no longer works though.

我觉得这里真正的问题是隐私和安全。电子邮件包含更多的信息比短信。作为用户,你真的不希望一个应用程序生态系统,第三方应用可以开始监控你的个人和专业电子邮件。

I think the real issue here is privacy and security. Emails contain much more info compared to SMS. As a user, you really would not want an app ecosystem where third party apps can start monitoring your personal and professional emails.

这篇关于如何监听电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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