Hi everyone,
I've been trying out the SMSLib.net recently.. I managed to get the
read messages program working and it is able to detect sms that has
been received in the SIM card.
However, the IInboundMessageNotification does seem to work.
I've tried sending sms to the number while it's running but the
notification doesn't appear.
When I run the program again, the new message is received without any
notification.
I've applied breakpoint to the belowmentioned codes within the
program, but it doesn't seem to even reach there...
Any advise please?
Codes:
public class InboundNotification : IInboundMessageNotification
{
public void process(AGateway gateway,
org.smslib.Message.MessageTypes msgType, InboundMessage msg)
{
if (msgType ==
org.smslib.Message.MessageTypes.INBOUND)
Console.WriteLine(">>> New Inbound message detected from Gateway: " +
gateway.getGatewayId());
else if (msgType ==
org.smslib.Message.MessageTypes.STATUSREPORT)
Console.WriteLine(">>> New Inbound Status Report message detected from
Gateway: " + gateway.getGatewayId());
Console.WriteLine(msg);
try
{
Console.WriteLine(New Inbound message detected
from Gateway: " + gateway.getGatewayId());
Console.In.ReadLine();
// Uncomment following line if you wish
to delete the message
upon arrival.
// gateway.deleteMessage(msg);
}
catch (Exception e)
{
Console.WriteLine("Oops!!! Something
gone bad...");
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
}
}
}
--
You received this message because you are subscribed to the Google Groups
"SMSLib User 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.