This is a small tool that can automatically send WeChat messages and Moments. This gadget is actually a WeChat automatic test written under Android Studio using Uiautomator.
The original intention of writing this tool was to collect WeChat communication data. If I didn't find the relevant tools on Google, I had to write it myself. Otherwise, the workload of manually sending thousands of WeChat messages and Moments would be too much.
I share this gadget in the hope that it can help some people, and also to record it. After all, I don’t know when it will be used again. The program is not well written, but I may not have time to maintain it in the future. If anyone is willing to submit improvements, I can grant permission for you.
Finally, this tool was originally developed to collect data for scientific research. If it is used for illegal purposes, you will be responsible for the consequences.
Operating system: Win8.1
IDE: Android Studio
JDK: 1.8
Automatic testing framework: Uiautomator
Test phone: Redmi 2 (android 5.0 API 21)
This tool mainly provides two functions: sending WeChat messages to friends and publishing messages in Moments. The process of all operations is exactly the same as normal manual operation of WeChat. The main functions of the tool are implemented in the UiAutomatorTest.java file in the app/src/androidTest/java/com/example/judy/uiautomatordemo folder. If you want to modify some functions, you should only change this file. My research on Uiautomator and Android Studio is still shallow. The ability to write this small tool relies entirely on google and bing. If you have any questions, you can also ask google for help.
The program starts by selecting a user in the address book, and then sends text, pictures and voice to this user.
Sending text messages is a Chinese string randomly intercepted from the /data/local/input/test.txt file in the mobile phone's SD card.
To send a picture message, you randomly select a picture from the mobile phone card and send it. Only one picture is sent at a time, but it can be sent multiple times in a loop.
The duration of sending voice messages is random, and the voice content is the sound in the environment when sending the voice (the same as sending voice normally using WeChat).
Open Moments and send text-only and picture-only messages.
Long press the "Camera" button in the upper right corner of the circle of friends to send a plain text message to the circle of friends. The content is also a message of indefinite length randomly intercepted from the /data/local/input/test.txt file in the mobile phone's SD card.
Short press the "Camera" button to send photos to Moments, first randomly select an integer n from 1-9 (Moments can send up to 9 photos at a time) as the number of photos to send, and then randomly slide the checkmark from the phone album Select n photos to send.