I\'ve been working on an app that sends SMS-messages. The problem I have is that the sendTextMessage method sends two messages with the same content. How do I fix that?
Following code works fine, S2 with ICS:
void sendMessageGTI9100ICS(String number, String msg) throws Exception {
SmsManager m = SmsManager.getDefault();
Class aclass[] = new Class[9];
aclass[0] = String.class;
aclass[1] = String.class;
aclass[2] = ArrayList.class;
aclass[3] = ArrayList.class;
aclass[4] = ArrayList.class;
aclass[5] = Boolean.TYPE;
aclass[6] = Integer.TYPE;
aclass[7] = Integer.TYPE;
aclass[8] = Integer.TYPE;
Method method = m.getClass().getMethod("sendMultipartTextMessage", aclass);
Object aobj[] = new Object[9];
aobj[0] = number;
aobj[1] = null;
aobj[2] = m.divideMessage(msg);
aobj[3] = null;
aobj[4] = null;
aobj[5] = Boolean.valueOf(false);
aobj[6] = Integer.valueOf(0);
aobj[7] = Integer.valueOf(0);
aobj[8] = Integer.valueOf(0);
method.invoke(m, aobj);
}