StaticDataHelper.log("[SMS] Returning from run() while 'stop' is " + stop);
return;
}
Datagram d = dc.newDatagram(dc.getMaximumLength());
//
dc.receive(d);
//
String address = new String(d.getAddress());
StaticDataHelper.log("[SMS] Message received: ");
StaticDataHelper.log("[SMS] From: " + address);
/*
* The NotificationProcessor reads the
* binary SMS notification message and extracts
* informations from it that are stored into a
* passed hashtable
*/
NotificationProcessor processor = new NotificationProcessor();
/*
* The hashtable to be passed to the
* notification processor to be filled
* with data from the binary SMS from
* the server. See
* NotificationProcessor.processMessage
*/
Hashtable smsData = new Hashtable();
//getData() returns an array of bytes
processor.processMessage(smsData, removeHeader(d.getData()));
if (smsData != null) {
StaticDataHelper.log("[SMS] Data from SMS message:\n" + smsData.toString());