sms receive on Port 0 of mobile

橙三吉。 提交于 2019-12-03 20:18:21

According to this discussion, it is not possible to receive a SMS on port 0 using a MIDlet before it enters the inbox. And while I am not familiar with the Wireless Messaging API, various other posts seems to indicate that you cannot access the inbox either (I might be wrong on this).

What I think you could do instead is to open a serial connection to the modem part of the phone and listen for an UR code (Unsolicited Response, "events") indicating that a new SMS is arrived, read it and if it matches your criteria delete it (from the inbox, you still have your copy) using AT commands. See the AT+CNMA command (New Message Acknowledgement) and similar in the standard (most mobile phone AT commands are by the way specified in 27.007).


For the following I have no idea if if even makes sense/is possible. I only mention it for completeness.

As for processing the SMS before it arrives in the inbox I think the only option (without it having being sent to a specific port that you listen for) is SIM application toolkit (which can do a hell of a lot of things), although that is way outside the scope of J2ME and highly obscure and highly un-trivial. Only follow this route if you are really, really desperate.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!