Android auxiliary function to automatically grab red envelopes (with source code)

1、 Description @ h_ 502_ 5@

Recently, I saw the software used by my colleagues to grab red envelopes, so I wanted to see how to realize the specific implementation of red envelopes, so I learned about the implementation of useful auxiliary functions. Therefore, in the following example, I will show a small demo of red envelopes, with the source code and the source code of red envelopes@ H_ 502_ 5@

2、 Effect drawing @ h_ 502_ 5@

@H_ 502_ 5@@H_ 502_ 5@

Grab @ h after receiving a red envelope on the desktop_ 502_ 5@

@H_ 502_ 5@@H_ 502_ 5@

Received password red envelope @ h on chat page_ 502_ 5@

3、 Accessibilityservice uses @ h_ 502_ 5@

Create an auxiliary service class, inherit accessibilityservice, implement two interfaces, and receive system events @ H_ 502_ 5@

Auxiliary service configuration file, configure events, and create accessibility under RES / XML_ service_ info.xml @H_ 502_ 5@

Register the service auxiliary service and attach the XML created in step 2 to the service. See to clear some of the following attributes, which must be added. If some are not added, it will have no effect @ h_ 502_ 5@

4 add permission @ h to the manifest file_ 502_ 5@

Auxiliary service configuration file XML attribute description: @ h_ 502_ 5@

@H_ 502_ 5@

Provides a base class of accessibilityservice, integrating some common methods: @ h_ 502_ 5@

4、 QQ grabs red envelope @ h_ 502_ 5@

(1) Red envelope grabbing process: @ h_ 502_ 5@

(2) Realized function: @ h_ 502_ 5@

(3) For the red envelope auxiliary function class, the comments are well written and easy to understand. The qqconstant class is useful in the class, and the code @ h is posted in the fourth point_ 502_ 5@

(4) Constant @ h used in QQ auxiliary service_ 502_ 5@

5、 Red envelope problem @ h_ 502_ 5@

It is occasionally detected by QQ that the red envelope plug-in is used. It may be because the speed of grabbing is too fast, resulting in the data not conforming to the normal click time. I have added a delay time. I don't know whether it is effective. If I know, I can leave a message. Thank you@ H_ 502_ 5@

On the main page of QQ, the notification bar will not notify when receiving a message, so it can't be analyzed here. The notification bar jumps to the chat page. I can't find any elements to tell me how to enter the red envelope chat page. If I know, I can leave a message. Thank you@ H_ 502_ 5@

This kind of auxiliary service grabs red envelopes. After entering the chat page, his search field will only retrieve the visual elements of the current page. If some red envelopes are not visible on the chat record, you need to slide them to trigger the analysis of red envelopes. However, generally, 10 red envelopes will not be sent out at one time, hehe@ H_ 502_ 5@

6、 Summary @ h_ 502_ 5@

I have learned to make this project and understand the use of auxiliary functions. I feel that this can still do a lot of things. The core code has been posted on it. You can click on the source code. Grab red envelope source code @ h_ 502_ 5@

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips@ H_ 502_ 5@

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>