Android news client development! Android developers change job interviews, architects must-have skills

Preface

Many Android developers often ask me, what should I learn to become a good Android engineer? For this problem, their descriptions are somewhat different, but in general, we all need to learn a series of skills in order to become an excellent Android engineer.

In my opinion, such confusion is normal. Android is a huge and dynamic ecosystem. You may need to spend several weeks to understand and learn some of its related tools and concepts, but in the end you will find that many of them are not very important, or not very useful. Therefore, in this article, I will share the important skills I used in Android development, hoping to help you, allowing you to focus your energy on important things.

So, today, I will present an "Android Knowledge Graph", based on my own experience & what I have seen and heard, to tell you what you actually need to learn to learn Android, I hope you will like it.

Face-to-face sharing

I was pushed by a friend over there to help me. After the resume was approved, I called for an interview.

The interview time was scheduled at 10:30, and I arrived downstairs at the company about 20 minutes earlier. The company floor is a bit complicated, and it took about ten minutes to get to the destination (about the cafeteria).

In the first round, two interviewers take turns asking questions. It took about an hour for the first side to meet at 11:40 and it was almost time for dinner. After the interview, I was ready to leave. The two interviewers asked me to wait for a meeting, and then went directly to call the interviewer of Ermian, and I was in the cafeteria to watch everyone eat.

After waiting for about ten minutes, the second interviewer called me to the 31st floor.

There were also two interviewers who took turns asking for about an hour. After Ermian it was almost one o'clock in the afternoon, and the interviewer took me to the cafeteria for a meal, and then helped me make an appointment for HR noodles at two o'clock in the afternoon.

The whole process is very cool. There are three rounds of interviews, two rounds of technical (both two interviewers), and one round of HR.

Technical side

  1. Common Activity type + description Activity life cycle
    Activity has a variety of states from creation to destruction, from one state to another state will trigger the corresponding callback methods, these callback methods include: onCreate onStart onResume onPause onStop onDestroy In fact, these methods They all correspond to each other in pairs, onCreate creation and onDestroy destruction; onStart visible and onStop invisible; onResume editable (ie focus) and onPause. .

  2. Which methods are inevitably executed when jumping between two activities?
    Under normal circumstances, for example, there are two activities, called A and B respectively. When component B is activated in A, A will call the onPause() method, and then B will call onCreate(), onStart(), onResume(). At this time, B covers the form, and A will call the onStop() method. If B is a transparent or dialog box style, then A's onStop() method will not be called.

  3. How does the system help us find the desktop application?
    I said through the intention, and he said how to find which intention? I said that PMS will parse the AndroidManifest.xml of all apk, if it is parsed, it will be stored in package.xml and will not be parsed repeatedly. PMS can be found with it.

  4. The life cycle of Activity when switching between horizontal and vertical screens is
    related to the configuration in the manifest file.
    When the android:configChanges of Activity is not set, the screen will be re-invoked for each life cycle. By default, the current activity is destroyed first, and then reloaded.
    When Activity android:configChanges="orientation|keyboardHidden|screenSize" is set, each life cycle will not be called again when the screen is cut, only the onConfigurationChanged method will be executed. Usually in game development, the orientation of the screen is hard-coded.

  5. What are the processing techniques for screen adaptation?
    Mobile phone adaptation is mainly divided into two situations: switching between horizontal screen and vertical screen, and the difference in resolution.

  6. The problem of network optimization The
    same ip and the same port can multiplex a connection. Later, I asked about the multiplexing of http 2.0. I said that a tcp can have multiple requests. How is the principle? I said I don't know. Let me talk about https later.

  7. Fast sorting and recursion

  8. The difference between array and linked list

Technical two sides

1. Several ways to store data: SharePreference, database, file

2. When using Android database, what life cycle methods are there: onCreate, onUpgrade

3. What do you need to do if you want to add fields to the database?

  • Method 1: Do it by alter table add column

  • Method 2: Rename the old table first, then create a new table containing new fields, then migrate the old table data, and finally delete the old table

4. Is the database read and write thread-safe?

  • Read operations are thread-safe: it is possible for multiple threads or processes to read the contents of the same database.

  • Multiple thread operations will throw exceptions for write operations (I don’t feel that thread is not safe here, because SqlLite does have a locking mechanism): Using sqlite in multiple processes or threads and operating the same database at the same time will cause An exception is thrown. Different threads or instantiating multiple SqliteOpenhelper to operate the same database can also cause the same problem. But it is possible for different threads to use the same sqliteopenhelper to obtain SqliteDatabase for operation.

5. The realization principle of SharePreference, is it thread-safe, what is the difference between apply and commit?

The commit method has a boolean return value. When data changes are stored, it is an atomic operation. When two editor objects operate on a shared preferences parameter at the same time, it will always be the last editor to call the commit method. The last data value.

The apply method has no return value. When two editors edit the preferences object at the same time, it is also the last object that calls the apply method to edit data. The submit operation of apply is also atomic, but it is only submitted to memory, which is faster.

6.Handler mechanism

7. Principles of HashMap, HashTable, ConcurrentHashMap

8. Five-layer model of computer network

9.http status code

10. The most difficult problem you encountered?
I said that our company project did not use the dynamic loading framework, but the later integrated U3D project needs to be dynamically loaded, but only the so and resource dynamic loading are needed. The third library does not support our needs functionally, so I just bite the bullet. The source code of each major version is supported, dynamic repair and replacement loading so and assets resource dynamic repair and loading are supported, and then the specific details are explained again.

Design pattern study notes

Design Pattern Series Learning Video

BA%9B%EF%BC%9F%E5%A6%82%E4%BD%95%E9%9D%A2%E8%AF%95%E6%8B%BF%E9%AB%98%E8%96%AA%EF%BC%81.md)】。**

Guess you like

Origin blog.csdn.net/fanzhang_vip0723/article/details/114194936