uygary / google-voice-java

Automatically exported from code.google.com/p/google-voice-java
0 stars 0 forks source link

unread messages ? its not in the right spot #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
Collection<SMSThread> smsThreads = voice.getSMSThreads(voice.getUnreadSMS());
        for (SMSThread t : smsThreads)
        {
            Collection<SMS> allsms = t.getAllSMS();

            for (SMS smsind : allsms)
            {
                if (smsind.getContent().contains(passcode))
                {
                    String emergencyMsg = smsind.getContent().replaceAll(passcode, "");
                    OsisUserDatabase oInsertOsisDatabase = new OsisUserDatabase();
                    List<String> phn = oInsertOsisDatabase.getAllPhoneNumbersSendSMS();
                    for (String oPhn : phn)
                    {
                        String destinationNumber = oPhn;
                        voice.sendSMS(destinationNumber, emergencyMsg);
                    }
                }

                voice.markAsRead(t.getId());
            }
        }

2.
3.

What is the expected output? What do you see instead?

I expect to on get a collection of unread messages

What version of the product are you using? On what operating system?

1.14

Please provide any additional information below.

There must be a way to parse out the unread messages.  It would be good if you 
could add a function instead of getAllSMS to just getALLUNREADSMS

Original issue reported on code.google.com by stevenco...@gmail.com on 3 May 2012 at 3:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think this is more a feature request than a bug.  Am I incorrect here?  It 
seems also that you have written code to solve your own problem?  I just want 
to be sure.

Original comment by malone.j...@gmail.com on 14 May 2012 at 3:43