Implementation of SMS sending and receiving in Java-Introduction to smslib

Source: Internet
Author: User

Recently, I have been writing a Java SMS app.

Later Google to smslib, good opensource. libraray.

I cannot find any Chinese on the internet,

So let's translate the introduction of smslib.

Smslib
Is a GSM modem that allows you to use
Or a Java
Library. (Open Source)

 

Smslib
The latest version is 3.4.6.

Smslib v3
Some previous functions are retained:

1.
Support serial port or IP address through a series of column
Connect to GSM phone
And GSM Modem

2.
Support PDU/Text
Protocol

3.
Supports simple text message sending and receiving

4.
Supports 7bit, 8bit, and ucs2 (UNICODE)
SMS characters

5.
Supports sending and receiving multimedia information

6.
Flash mail

7.
Push supported

8.
You can view the SMS status

9.
You can view the serial port information/address information when sending text messages.

10.
View the connected GSM modem.
Information: includes: model, vendor, S/W
Repair, signature, etc.

11.
Supports sending through some gateways through htpp/https
Protocol

12.
Support smpp
Protocol

 

In addition, V3
Some new features are introduced.

Smslib v3
Introduction to the concept of Gateway:


Gateway is a device or service interface used to send and receive SMS messages. A gateway can be a GSM modem.
It can also be a service provider, smslib
You can process multiple gateways at the same time.

 

Sending priority:

Smslib
SMS sending can provide an unlimited priority (that is, a policy for sending multiple messages, which is the first and which is the last), smslib
The priority policy is
Or text message providers), unless they are fake photos.

 

Asynchronous and synchronous receiving

Smslib
You can receive text messages in two ways.

1.
Synchronous reception: You can call the read () method at any time to receive text messages.

2.
Asynchronous receiving: Waiting For smslib
Automatically receives SMS messages when the SMS arrives.

 

Asynchronous and synchronous transmission

Smslib
There are two ways to send text messages.

1.
Synchronous sending: when your app uses smslib
When a text message is sent, the app thread will be locked until the text message is sent or fails to be sent.

2.
Asynchronous sending: when you use this method to send a text message, the app
The thread will not be locked, smsliib
Will return immediately, smslib will send your text message (s) in the background. You can choose whether to remind you of the status of the text message.

 

Callback Function

Smslib
You can define the callback method (event-driven)

Inbound voice cballs:When a call is received, you can set whether to remind you. Please note that the call will automatically and unconditionally stop

Inbound messages:Whenever a new text message comes,Smlib
You can set to call your specified method.

Outbound messages: When sending messages asynchronously, you can call the method you specified to obtain the status information of the sent messages.

Gateway status changes: smslib
Remind you every timeGateway
Status Change

Queue sending operation: smslib
You can prepare to send a text message at any time and obtain the sending status of the current text message anytime, anywhere.

 

 

 

 

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.