早上好,我有以下代码:
int numero = 22492;
String PhnNoStr = String.valueOf (numero);
String transaction = WriteText(tipoTransacao);
String SmsStr = "ECART" + "" + transaction + idToken;
System.out.println ("Message:" + smsStr);
MessageConnection msgCon = null;
msgCon = (MessageConnection) Connector.open ("sms :/ /" + + phnNoStr ": 500");
TextMessage TxtMsg = (TextMessage) msgCon.newMessage (MessageConnection.TEXT_MESSAGE);
txtMsg.setPayloadText (smsStr);
msgCon.send (TxtMsg);
所以我默认发送该消息它会返回一条消息。我可以发送和接收此消息,但是当我收到此消息时需要拦截,有人知道我该怎么做吗?
谢谢