Android game development employment! Essential skills for Android architects of GitHub Markstar 1w, tearful finishing experience

Preface

Recently, two dramas have exploded, 30 is only, 20 is not confused, in fact, I just started watching these 2 TV dramas, I wonder if it is the opposite. Shouldn’t it be 29, isn’t 30 confused? Thinking about it later, he should actually want to tell us this cruel reality! In this era, when we are 20 years old, we must mature and accept the cruelty of the world. There is no time to give us time to be confused. The world always forces us to grow like this. And 30 is better than a good wish for the future! At the age of 30, where to eat breakfast is decided, the traces of your previous ten years of struggle, Manny’s roadside stall, Xiaoqin’s warm happiness, Gu Jia’s luxurious breakfast.
I have worked for Toshiba, Oriental Group, Ali, Sany Heavy Industry. I have 15 years of project development experience. I am familiar with assembly, java, c/c++ development languages. I have in-depth research on the underlying system, web development and mobile development. It mainly involves application-level mis, erp projects and various embedded device software (mobile phones, tablets, switches, multifunction machines, drones, TVs, smart homes, etc.).
Recently I saw this drama full of feelings, I was thinking if Really start again, will my life be different again!

Message generation

The user swipes the screen to generate a series of input events (a Down event, several Move events, and an Up event). These events are packaged by the system into a series of Messages (one Down Message, several Move Messages, and one Up Message)

Message is used to transmit information. The above Message contains the information of these input events, such as x-coordinate and y-coordinate.

MessageQueue 存放 Message

After the messages are generated, there is a question: how are these messages sent to the application? If I want to slide the Moments, these messages must be sent to WeChat for processing by WeChat. WeChat will send these events to the List control of Moments to let the List generate new content and slide up and down.

The first thing that comes to mind is whether you can directly send these Messages to the List control in Moments (SystemServer can send Binder directly to the List control), yes, but it is troublesome; SystemServer directly sends input messages to the List control in Moments, then SystemServer must first Knowing that there is such a control, the question is which controls are in the application, SystemServer does not know, is it necessary to traverse all the controls and send a repeated message to each control? This is obviously not what we want.

SystemServer cannot be sent directly to the control, so can it be sent directly to the application and let the application handle it by itself? The answer is yes. Now Android does the same. Your application prepares a MessageQueue (message queue). If I have a Message, put it in this MessageQueue, and your application handles it by yourself. Isn’t it beautiful? This is the reason why MessageQueue appears.

Looper sends out Message

After the application prepares a MessageQueue, SystemServer puts a series of Input Messages (a series of Messages (a Down Message, a number of Move Messages, and an Up Message)) packaged before into the WeChat MessageQueue, and the rest is left to WeChat itself To read the contents of MessageQueue, update the UI by yourself

The problem is that MessageQueue is only used to store Message, and someone needs to manage this MessageQueue. For example, there are several messages in MessageQueue. Who should send these messages to deal with?

Looper is introduced here. Looper decides who should send this Message to be processed. Looper will take out the Message one by one according to the order of the Message in the MessageQueue, and send it according to the message that comes with the Message (who I want to be processed-target) Deal with the corresponding person

In this example, the target of these Messages is the handler of the main thread of WeChat

Handler handles Message

At this time, the Handler came out. It was said that Looper sent the Message to the corresponding person for processing. This person is the Handler. The Handler is used to process the Message. As the last link of the Message mechanism, the Handler reads the content of the Message and performs related processing based on the content.

In this example, a series of Input Messages will eventually be processed by WeChat’s main thread Handler. After a complex event delivery and event distribution process, they will be passed to the corresponding List control. The List control calculates its next step based on the contents of the Input Message. The position of each Item in the frame, update its own Item and the content in the Item, thereby producing the List sliding effect, and the sliding process of the circle of friends is completed

Message mechanism summary

With the above case of Message mechanism, it is logical to understand the picture below, as shown in the above headings

  1. Message carries content
  2. MessageQueue 存放 Message
  3. Looper sends out Message
  4. Handler handles Message

to sum up

[Android detailed knowledge point mind map (skill tree)]

I personally do Android development. I have been doing Android development for more than ten years. I am currently working as a CTO and system architect in a startup company. Although Android is not as hot as in previous years, the era of finding high-paying jobs with the four major components has passed. This can only show that the positions below the intermediate level of Android are saturated. Now senior engineers are still relatively lacking . Many senior positions give very high salaries (you may not be able to find a suitable one if you have more money), so I strive to become a senior engineer. is the most important.

Attached here are dozens of sets of ByteDance related to the above-mentioned interview questions, interview questions from JD.com, Xiaomi, Tencent, Toutiao, Ali, Meituan and other companies in 19 years. The technical points are organized into videos and PDFs (in fact, it took a lot of effort than expected), including knowledge + many details.

Due to limited space, I will show you a small part in the form of pictures.

The detailed arrangement can be seen on GitHub;

Android architecture video + BAT interview topic PDF + study notes

There are a lot of materials for learning Android on the Internet, but if the knowledge learned is not structured, and when you encounter problems, you just taste it and don’t study it in depth, then it is difficult to achieve real technological improvement. I hope this systematic technical system can provide you with a direction reference.

The knowledge gained is not a system, and when you encounter problems, you just taste it and stop studying it in depth, so it is difficult to achieve real technological improvement. I hope this systematic technical system can provide you with a direction reference.

Finally, I would like to give everyone a word and encourage each other!

Guess you like

Origin blog.csdn.net/chayel123/article/details/114026510