I want to get the text and sender of the SMS read from the modem so that I can manipulate it as appropriate and then delete the read and used messages.this is the part of the code:
msgList = new ArrayList<InboundMessage>();
Service.getInstance().readMessages(msgList, MessageClasses.ALL);
for (InboundMessage msg : msgList)
System.out.println(msg);
System.out.println("Now Sleeping - Hit <enter> to stop service.");
System.in.read();
System.in.read();
}