Use handler to send the message: "This message is already in use" SOLUTION

Source: Internet
Author: User

Problems are frequently encountered, solved, and constantly growing every day. Therefore, we were honored to have encountered a new problem and thought, "I am the first person to have encountered this problem. I also want to be the first person to reject this problem. In this way, people will learn how to deal with it, and then record your name in the question history book, multi-bull X, isn't it ?... Haha ~ Proud ~!" Actively and calmly face every problem you encounter. This will benefit you a lot and make more progress. Come on ~~~

When using handler to send messages, a problem occurs as follows:

10:32:15 07-01. 233: Error/androidruntime (9774): Android. util. androidruntimeexception: {What = 1006 when =-2 ms arg1 = 1 OBJ = motionevent {40551f40 action = 0 x = 180.85541 y = 390.24445 pressure = 0.1137255 size = 0.06666667 }}This message is already in use.
This error is always reported, and the problem becomes obvious. Indicates that the sent message is in the message queue and is in use. Solution: Create a new message and send it! Solve the problem.

When I was thinking about a problem, I didn't want to create a new object and want to reuse it again, so I thought about how you clearly knew that the message was used up there, remove from the output message queue ,【Note:: Because the CPU runs at a high speed, you can think about it. Therefore, when removing a message, you have to determine that the message queue is automatically removed after the message is processed by the system, in fact, it is necessary to determine whether the message is still in the message queue.] I have encountered a problem here. I don't know how to determine whether a message is still in the message queue. Ask the superior for advice? Thank you ~~

 

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.