1

我想使用这个谷歌语音 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());
        }
    }

}
4

0 回答 0