1 - I'm trying to read the message report.
2 - To deliver the message (sms) code calls the "process" (making the
implementation of IInboundMessageNotification) however it reads the
input message and the message does not identify particular report type
(MessageTypes.STATUSREPORT)
code:
---------------------------------------------------------------------------------------------------------------------------------------------
SerialModemGateway gateway = new SerialModemGateway(
"gateway", "COM4",
9600, "ZTE", "MF180");
gateway.getATHandler().addStorageLocation("SMMTME");
gateway.getATHandler().addStorageLocation("SMME");
gateway.getATHandler().addStorageLocation("MTSMME");
gateway.setProtocol(Protocols.PDU);
gateway.setInbound(true);
gateway.setOutbound(true);
---------------------------------------------------------------------------------------------------------------------------------------------
InboundNotification inboundNotification = new InboundNotification();
service.setInboundMessageNotification(inboundNotification);
---------------------------------------------------------------------------------------------------------------------------------------------
public class InboundNotification implements
IInboundMessageNotification {
public void process(AGateway gateway, MessageTypes
msgType,InboundMessage msg) {
if (msgType == MessageTypes.INBOUND) {
System.out.println(msg);
} else if (msgType == MessageTypes.STATUSREPORT) {
System.out.println(msg);
} else {
System.out.println(msg);
}
}
}
---------------------------------------------------------------------------------------------------------------------------------------------
OutboundMessage message = new OutboundMessage("6199999999","SMS!");
message.setStatusReport(true);
---------------------------------------------------------------------------------------------------------------------------------------------
OutboundNotification outboundNotification = new
OutboundNotification();
service.setOutboundMessageNotification(outboundNotification);
service.queueMessage(message,ModemGSM.getSerialModemGateway().getGatewayId());
---------------------------------------------------------------------------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups
"SMSLib Discussion Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/smslib?hl=en.