简体   繁体   English

Android:如何轮询电子邮件?

[英]Android: How to poll email?

I'm making a widget who, among other things, displays the quantity of unread emails the user has in a given inbox. 我正在制作一个小部件,该小部件除其他外,将显示用户在给定收件箱中的未读电子邮件数量。
Specifically, I'm asking how to: 具体来说,我想问如何:

-Obtain the list of email accounts on the device -获取设备上的电子邮件帐户列表

-Make a call to one of the accounts such as -拨打以下帐户之一

    int newMailCount = accountInstance.getMailCount()

Any ideas? 有任何想法吗?

Thanks 谢谢

Obtain the list of email accounts on the device 获取设备上的电子邮件帐户列表

This is not possible. 这是不可能的。 You can use AccountManager to try to get at account information, but there is no "email" type that I am aware of, and email programs do not have to use AccountManager . 您可以使用AccountManager尝试获取帐户信息,但是我所知道的没有“电子邮件”类型,并且电子邮件程序不必使用AccountManager

Make a call to one of the accounts 致电其中一个帐户

There is nothing in the Android SDK for email. Android SDK中没有用于电子邮件的内容。 There are dozens, perhaps hundreds, of email programs out there. 那里有数十种,甚至数百种电子邮件程序。 None are part of the operating system. 没有一个是操作系统的一部分。 Email programs are welcome to create their own app widgets. 欢迎电子邮件程序创建自己的应用程序小部件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM