Android - How can I find out how many unread email the user has?

前端 未结 3 497
梦如初夏
梦如初夏 2021-01-06 22:10

I\'m writing a program that should display the amount of unread sms, mms, phone calls and emails. It was quite easy to find how to query for sms and phone calls (I used the

3条回答
  •  暖寄归人
    2021-01-06 22:41

    I'm the author of Gmail Unread Count. Check out Gmail.java, it's what I use. There are a couple of ways to do it. I read the unread count directly from the label. You should be able to figure out how to use it by reading the source.

    Getting the unread count from Email is afaik not possible so you'll have to do polling there.

提交回复
热议问题