09-23-2008 11:58 AM
09-23-2008 02:36 PM
09-24-2008 03:19 AM - edited 09-24-2008 03:21 AM
For example to recieve a sms use this code:
_dc = (DatagramConnection)Connector.open("sms://"); Datagram d = _dc.newDatagram(_dc.getMaximumLength()); _dc.receive(d); String address = new String(d.getAddress()); String msg = new String(d.getData()); System.out.println("Message received: " + msg); System.out.println("From: " + address);
With this code creates a server that is expected to receive an sms. I would like to know if you can put a timeout to continue running the following code if once that time has not received any sms.
09-24-2008 01:46 PM