Joke Collection Website - Public benefit messages - Solution of automatically obtaining SMS check code
Solution of automatically obtaining SMS check code
To realize the automatic test of the above business processes, the most critical point is to automatically obtain the SMS check code. In order to solve this problem, my team envisaged three schemes:
The first scheme is to intercept short messages sent by commercial platforms to users from the background. This scheme looks beautiful, but its problem is that the SMS check code is issued by a third-party platform. Interception and analysis of messages in the background is not only costly, but also may violate the bottom line of network security, which is not feasible.
The second scheme is to make a fuss from the mobile phone, develop a mobile phone application to forward the verification code message to the mailbox, and then log in to the mailbox on the computer to get the verification code. This method is feasible, but there is a risk of network delay.
The third scheme is to develop a mobile phone application to analyze the SMS check code and write it into the mobile phone memory file, and then copy the check code file to the computer through USB connection and read the local file to obtain the check code. Because the third scheme avoids the risk of network delay compared with the second scheme, we choose it as the final solution.
? First, Android phone configuration
1. Based on the Android system, an APK is developed to parse the SMS check code and write it into the mobile phone memory file. We named it SmsTest.
2. Install SmsTest on Android phone. After installation, you can see the following icons on the phone desktop.
3. Open all permissions of SmsTest application.
4. Open the mobile phone developer mode and turn on USB debugging.
? Second, the computer configuration
1. Install JDK and configure environment variables.
2. Install SDK and configure environment variables.
Please refer to the first and third steps of/dr _ neo/article/details/49870587 for specific steps. After installing SDK, enter ADB instruction in the command line window to test. If you see the following prompt, the SDK configuration is successful.
3. Install the Android USB driver.
3. Obtain the platform check code
1, the mobile phone starts the SmsTest applet.
2. Connect the mobile phone to the computer through USB cable, and select the file access right in the prompt message that pops up on the mobile phone.
3. Call the getSms method in the automated test script to obtain the check code sent by the platform.
- Previous article:Streaming media SMS number 1068
- Next article:How to import vivo mobile phone data into red rice mobile phone
- Related articles
- Hangzhou epidemic related express transfer SMS content
- How long does it take for online merchants to get the result of loan application?
- Inquiry method of nucleic acid detection results in Huiban, Hubei Province
- How to write SMS in Apple 4s?
- You have a girlfriend. What do you do when someone tells you?
- Does anyone know the inquiry method of Tengzhou provident fund?
- A mother in Zhengzhou entrusted her child to a nanny for three years and did not return the news. Why does the mother ignore her children?
- How to wish others a promotion
- What should I do if oppor823t sends a message that there is no healthy disk after restoring the factory settings?
- What does the associated shutdown reminder mean?