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
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.
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.