[英]How can I get my app to listen for Incoming SMS messages?
I have a windows form App which is written to send and recieve texts, this is implemented by sending a message via .NET Remoting to a Service installed on a server, which has a GSM modem (dongle) connected to it, the service then sends the message through the GSM modem once it has a message from the Client App. 我有一个Windows窗体应用程序,编写该应用程序可以发送和接收文本,这是通过.NET Remoting发送消息到安装在服务器上的服务实现的,该服务已连接了GSM调制解调器(加密狗),然后该服务发送一旦收到来自客户端应用程序的消息,便通过GSM调制解调器发送消息。
Everything's going well so far with regards to sending a text, However we need functionality to enable the reading of incoming text messages; 到目前为止,关于发送文本的一切都很好,但是我们需要能够读取传入的短信的功能。 I'm unsure how to go about writing my code to listen out for incoming texts, and then send them over to my Client App. 我不确定如何编写代码来侦听传入的文本,然后将其发送到我的客户端应用程序。
Could anyone give me some pointers on where to start please? 谁能给我一些从哪里开始的指示? I've tried MSDN Documentation on the TcpClientChannel Classes, but this doesn't prove useful for listening to the COM port or anything like that. 我已经在TcpClientChannel类上尝试了MSDN文档,但这对于侦听COM端口或类似端口并没有帮助。
If you are using the AT command set then I'm afraid your server will have to poll the dongle's SIM for messages at an interval (whatever makes sense). 如果您使用的是AT命令集,那么恐怕您的服务器将必须每隔一段时间(无论有什么意义)轮询加密狗的SIM卡以获取消息。
In terms or notifying the client you can either: 根据条款或通知客户,您可以:
-or- -要么-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.