我想使用此Google语音API将我的所有邮件标记为已读。下面的代码不起作用,任何想法为什么?
import java.io.IOException;
import java.util.Collection;
import com.techventus.server.voice.Voice;
import com.techventus.server.voice.datatypes.records.SMSThread;
public class voiceApplication {
public static void main(String[] args) throws IOException {
Info info = new Info();
String userName = info.getUsername();
String pass = info.getPassword();
Voice voice = new Voice(userName, pass);
Collection<SMSThread> smsThreads = voice.getSMSThreads(voice.getUnreadSMS());
for (SMSThread message : smsThreads)
{
voice.markAsRead(message.getId());
}
}
}