开发者

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.

Make a call to one of the accounts

There is nothing in the Android SDK for email. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜