我有代码
DatagramConnection _dc =(DatagramConnection)Connector.open("sms://");
Datagram d = _dc.newDatagram(_dc.getMaximumLength());
_dc.receive(d); //Receive the sms
byte[] bytes = d.getData();
String address = d.getAddress(); //The address of the sms is put on a string.
String msg = new String(bytes);
上面的代码是连续监听传入的短信,还是只监听 1 条短信?如果它只收听 1 条短信,请您提供代码以连续收听短信。