Smsdemo SMS Example Program description

Source: Internet
Author: User
Smsdemo SMS Example Program description


Today tested the BlackBerry development tool built in the Smsdemo example program, which is a very good example of SMS transceiver program.





Import Method:


Eclipse Development Tools Menu File-> import-> import BlackBerry Samples





Smsdemo can send SMS to mobile phone inbox, also can send SMS to mobile phone specific port, can receive SMS, receive a specific port 3590 SMS.


How to use:
After starting the program, prompt Send messages to inbox?


If the choice is, the message will be sent to the other cell phone SMS inbox inside (port 0).
If the other side of the phone also runs this program, will prompt:
Received:
Destination:sms://+86 13812340000
Data:
Xxxx


If you choose No, SMS will be sent to the other side of the mobile phone port 3590 above.
At this point: the Smsdemo only captures incoming SMS messages sent to port 3590, meaning it ' ll ignore messages T.
If the other side of the phone also runs this program, will prompt:
Received:
Destination:sms://+86 13,812,340,000:3,590
Data:
Xxxx


Precautions:
If there are other programs on the machine that are listening on port 0 (for example, Labi), the error will be:
Net.rim.device.api.io.IOPortAlreadyBoundException:SMS Port already in use


Reference
http://supportforums.blackberry.com/t5/Java-Development/Unread-SMS-Catch-SMS/m-p/19137


Http://supportforums.blackberry.com/t5/Java-Development/Problem-in-sending-SMS-through-simulator/m-p/255710?jump=true


http://supportforums.blackberry.com/t5/Java-Development/Deleting-Intercepted-SMS/m-p/20308


http://supportforums.blackberry.com/t5/Java-Development/PushRegistry-port-already-in-use/td-p/30303




The ZERO is the default SMS port. If you open the connection on port 0, it would read SMS that are suppose to appear in the Inbox.
Use of ' sms://: ' with Connector.open () would cause the error "Java.lang.IllegalArgumentException:Illegal opening string"
Use of ' sms://' with connector.open () would cause the error "Operation not permitted on a Client Connection"
Use the "sms://:0" with Connector.open () to work as desired.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.