Open GoogleCodeExporter opened 9 years ago
The voice.getSMSTreads() still produces the same error as I mentioned in the
Google Group. Instead, I read SMS directly from the JSON response. And it works
now, but I can read only the latest SMS in each tread. Here is the code I wrote:
//After Voice setup
String unReadSMSXML = voice.getUnreadSMS();
jsonString = parseXML(unReadSMSXML);
JSONObject json = new JSONObject(jsonString);
JSONObject smsObjects = json.getJSONObject("messages");
if(smsObjects.length() != 0){
Date now = ServerTimeManipulator.getCurrentTime();
ArrayList<String> keys = getKeys(jsonString); //the code I wrote that gets only key for each SMS
readMessages = keys.size();
for(int i=0; i< keys.size(); i++){
String currentKey = keys.get(i);
JSONObject oneMessageJsonObject = (JSONObject) smsObjects.get(currentKey);
boolean read = (Boolean) oneMessageJsonObject.get("isRead");
if(!read){
String phoneNumber = (String) oneMessageJsonObject.get("phoneNumber");
String messageText = (String) oneMessageJsonObject.get("messageText");
//Process message
}
}
}
Original comment by malone.j...@gmail.com
on 20 Mar 2012 at 3:23
RI believe Google made a temporary breaking change that has now been fixed. I
want to close off this issue if possible.
Original comment by malone.j...@gmail.com
on 25 Mar 2012 at 2:04
[deleted comment]
I get basically this same error. I posted a separate issue report for it.
Original comment by cs3vi...@gmail.com
on 8 Nov 2013 at 2:33
Original issue reported on code.google.com by
malone.j...@gmail.com
on 19 Mar 2012 at 8:48