Joke Collection Website - Blessing messages - How to judge whether Android SMS sending is successful?

How to judge whether Android SMS sending is successful?

First, you need to register two permissions in the program:

1. Allow receiving SMS.

2. Allow sending short messages

After that, you need to start the functions of two simulator test programs. The following is a screenshot of the implementation. Look at the first screenshot first. One simulator receives a short message from another simulator and displays it in the notification bar:

You will see that the port number of this simulator is 5554, which is equivalent to the mobile phone number. Just use this number as your mobile phone number and send a text message. The following screenshot is a screenshot of the main program. Click the send button and the message will be sent. At the same time, if successful, the system will send broadcast information.

The screenshot is as follows: