Record "read" field

30 views
Skip to first unread message

Chris K

unread,
Feb 17, 2012, 2:41:50 PM2/17/12
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.

Joseph Malone

unread,
Feb 17, 2012, 5:45:21 PM2/17/12
to google-v...@googlegroups.com

Great question.  I think if you check out the latest Source code, isRead is available.  I fixed that bug recently and have not released a new .jar yet

--
You received this message because you are subscribed to the Google Groups "Google Voice Java" group.
To post to this group, send email to google-v...@googlegroups.com.
To unsubscribe from this group, send email to google-voice-j...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-voice-java?hl=en.

Reply all
Reply to author
Forward
0 new messages