Recently, I want to intercept the touch screen message, which can always be used for related operations. However, the current Android system does not provide support for these events. Therefore, I tried to solve the problem by Wei Jie Zhao.
I have already written an article to describe the message-related knowledge. The general process of message processing has been clearly stated, including the process of obtaining and processing the message from generation to generation. After all, some special messages must be processed.
In essence, the input message is processed in a special way and then distributed to the corresponding place to make the correct action.
In a real system, how do we process messages? In Android, we perform different processing for two different sources: Touch Screen and buttons. There are two different processing methods for button messages: one is to distribute messages directly to the customer window through the pipeline, and the other is to distribute messages to WMS first, if WMS does not process the message, the message is sent to the customer window. Otherwise, the message is not sent to the customer window.