Chris K
unread,Feb 17, 2012, 2:41:50 PM2/17/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Voice Java
I'm curious as to why an isRead() method has not been implemented in
the Record class yet. To the best of my knowledge, at this point the
only way to retrieve unread messages, for instance an SMSThread, you
must create an SMSParser using the HTML response returned by calling
voice.getUnreadSMS().
Making a Voice object retrieve HTML and parse it into SMSThreads is
time costly. I'm thinking that ideally, your program will make a call
to voice.getSMSThreads() every once in a while, depending on how often
you poll Google Voice for results, and then cache those results
somewhere for your use. Wouldn't it be easier to filter through the
SMSThreads you have instead of re-polling GVoice for an HTML response?
I don't know if an easier way of retrieving read records has been
implemented so far, but the way I am doing it right now is to use
reflection to access the "read" Field and set it to accessible
temporarily so I can determine its value for each record. If there is
some implementation that I have overlooked, please let me know.