ArtStyle ArtStyle - 1 year ago 64
Objective-C Question

How to get a number of unread messages in gmail objective c

This sample allow me to fetch some labels from Gmail interface. The question is: Is it possible to fetch number of user's unread messages in Gmail using same tools like in the sample?

Answer Source

I'm not very good at objective-c, but you can get every message with the UNREAD-label and check the unread count:




 "id": "UNREAD",
 "name": "UNREAD",
 "type": "system",
 "messagesTotal": 354,
 "messagesUnread": 354,
 "threadsTotal": 320,
 "threadsUnread": 320

As you can see, messagesUnread tells me I have 354 unread messages.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download