The latest live Android programmer interview! Tearful professing the twists and turns of Alibaba's journey...

A few days ago, I had a technical exchange with an enthusiastic netizen in the official account. As a result, he talked about his recent interview in the chat. He said that he was interviewing Ali recently. He had been interviewed for 6 rounds only on the technical side. The resume was repeatedly salvaged twice. , Really scary.

But my friend’s technical prowess is still good . I don’t think anyone can let the interviewer salvage the resume with such perseverance?

Facts have proved that he is indeed very strong. After the six technical sides with mixed sadness and joy, he finally waited for the last step to victory-the HR side. I want to say that he is basically stable...

After my patience (death) heart (death) teaching (sorrow) guidance (seeking), he is also willing to dedicate the study materials reviewed before interviews and interviews, which is really gratifying . Let's read this article as the November Anai Sutra...

Because of the mechanism of the short book, too much content will affect the recommendation. Friends who need the Android interview review materials provided by him to share, can [click to join and get the free package]

 

The first time Ali (Fliggy Division) Android face-to-face sharing

Flying pig

One side + two sides

  • 1. The principle of multi-threaded resumable transmission

(1) The so-called breakpoint resumable transmission means that after the file is interrupted during the transmission process, when retransmitting, the transmission can be started from the last breakpoint, which can save time. There are two key points here. One is to detect the length of the file that has been downloaded locally and the breakpoint value; the other is to adjust the file pointer to the breakpoint on the server side.

(2) Implementation method: We use a simple method to achieve the function of resuming the transfer. When transferring files, create a temporary file to store the breakpoint position of the file. Check whether there is any Temporary file, if any, read the breakpoint value from the temporary file, and move the file pointer to the breakpoint position to start transmission, so that the breakpoint can be resumed

  • 2. Statistic start time and how to optimize cold start time

  • 3. ThreadLocal principle

  • 4. Talk about classloader

  • 5. What is generic and its application in the project

  • 6, the handler sends a message to the child thread, how to start the looper

  • 7. Delivery of down, move and up events

  • 8. Application scenarios of activity stack

(1) SingleTop is suitable for content display pages activated by receiving notifications. For example, if a news content page of a news client receives 10 news feeds, it is very annoying to open a news content page every time.

(2) SingleTask is suitable as a program entry point. For example, the main interface of the browser. No matter how many applications are launched from the browser, the main interface will only be launched once. In other cases, onNewIntent will be taken and other pages on the main interface will be cleared. The previously opened page is ok when you open the previous page, no more new creation.

(3) SingleInstance is suitable for pages that need to be separated from the program. For example, the alarm reminder, which separates the alarm reminder from the alarm setting. Do not use singleInstance for the intermediate page. If it is used for the intermediate page, there will be problems with the jump, such as: A -> B (singleInstance) -> C. After completely exiting, start it here. The first to open is B.

  • 9. Multithreaded access and function of static synchronized method, two synchronized methods in the same class, two threads access at the same time

  • 10. Inner classes, static inner classes and anonymous inner classes, and applications in the project

  • 11. How to know the size of the view when encapsulating the view

  • 12. The difference between arraylist and linkedlist, and application scenarios

(1) the difference between: ArrayList array is implemented based; the LinkedList is based on a double linked list implementation

(2) Usage scenarios:

① If the application performs a large number of access or deletion operations on the elements at each index position, the ArrayList object is much better than the LinkedList object;

② If the application mainly loops the list, and inserts or deletes during the loop, the LinkedList object is much better than the ArrayList object;

  • 13. How to start the service, how to exchange data between service and activity

He was the one or two faces of Ali who ended on September 20, and he received a call the next afternoon after the face, saying that he had hung up. But fate is too nonsense. On the eleventh day after being hung up, that is, November 1, it showed that his resume was picked up by other departments and invited him to Ali for an interview.

The second time Ali (Tmall Division) Android face-to-face sharing

Tmall

one side

  • 1. Self introduction + introduction project

  • 2. What about the source code that you have read ?

  • 3. The next thing is about EventBus. There are still old questions, advantages and disadvantages, and whether there are any problems. I listed many scenarios. I looked at the source code in detail, and answered and analyzed the things I have read. Then, the interface The choice between callback and observer mode.

  • 4. Ask me, you have seen so many source codes , what do you think is the most important?

  • 5. Answered a lot of reflection usage, multi-threading, Collections, and data structures in the source code .

  • 6. Fragment lazy loading

Two sides

  • 1. Ask me about multi-threading, extend the handler, I explain from the source code of the handler

  • 2. The memory leak derived by the handler, why the static inner class does not hold the external object

  • 3. Next is the scene question, the realization of the picture frame, the Lru cache, the thread pool, and the thread pool how to allocate the number of threads.

  • 4. What happens between APP opening and displaying.

  • 5. Why can java call c/c++ functions and talk about what happened when calling jni.

  • 6. Animation type, steps to use animation, have you seen the source code of animation framework .
    (The interviewer said that he has a good grasp of the basic knowledge of Android, knows how to read the source code , but the depth is not enough, you should learn from the Framework layer and c/c++)

  • 7. After reading my flutter project , I changed a framework and asked me about this framework.

  • 9. Let you design a cross-platform framework, how do you design it (here I talked about the architecture of flutter)

Three sides

  • 1. Dig into the project

  • 2.react-native communication mechanism

  • 3. The difference between react-native and phonegap

  • 4. The pits I encountered in the development of the project about react-native

  • 5. Have you seen the source code of react-native , can you tell me the most familiar source code?

  • 6. The difference between thread and process, whether the thread has its own memory

  • 7. The impact of multithreading

  • 8. Binder mechanism

  • 9. Why does android use binder for cross-process communication

All sides

  • 1. Synchronize usage, volatile usage, the difference and scenario between the two

  • 2. Dynamic permission adaptation scheme, the concept of permission groups

  • 3. Network request caching, how does okhttp handle network caching; image loading library related, how bitmap handles large images, such as a 30M large image, how to prevent OOM

  • 4. Process keep alive

  • 5. The principle and solution of listview picture loading disorder, how does listview cache?

  • 6. https related, how to verify the validity of the certificate, where is symmetric encryption used in https, where is asymmetric encryption, the difference between the two?

  • 7. Why does the Android system design ContentProvider, process sharing and thread safety issues

(1) Provide a way to share data across processes:

The system manages the creation, life cycle, and access thread allocation of ContentProvider, simplifying the way we share data (inter-process communication) between applications. We only need to access the data interface prompted by ContentProvider through ContentResolver, and we don't need to worry about whether the process it is in is started or not started.

(2) Better data access authority management:

ContentProvider can set permissions for the developed data. Different URIs can correspond to different permissions. Only components that meet the permission requirements can access the specific operations of ContentProvider.

Taobao’s chat data is encrypted locally (to prevent root being cracked), and a similar local data storage system is designed

  • 8. The difference between jvm-related and GC recovery algorithms

  • 9. Android related optimization (such as memory optimization, network optimization, layout optimization, power optimization, business optimization)

  • 10. The implementation principle of EventBus and the application of observer mode in development?

  • 11. How to use the dynamic agent model?

  • 12. How is the App sandboxed and why do you want to do it?

(1) Android is a multi-user system, and each application is an independent user. The system assigns a unique user identification (UID) to each application, and sets the permissions that the user can access for all files in the application. There is an independent VM in each process. Each application runs in its own process. When an application component needs to be executed, the system creates the process. When the system memory is insufficient, the system destroys the process.

(2) In many cases, applications originating from the same developer or the same development organization have a trust relationship with each other. The Android system provides a so-called shared UID (SharedUserID) mechanism, so that applications with trust relationships can run in the same process space.

(3) The sandbox is a security mechanism that provides an isolation environment for the app. It strictly controls the resources accessed by the executed program to ensure the security of the system, allowing the app to perform tasks in an independent process, so that it cannot access external processes. Resources, such an application has a problem, other application processes can be guaranteed not to be affected

Why write this?

In fact, I have two purposes for sharing this interview:

①, congratulate him on successfully passing the interview with Ali;

②. I hope that friends on the short book can encourage and motivate themselves through my friend’s experience. In fact, the interviews of major Internet companies are not terrible. The terrible thing is that you don’t know how to improve yourself and waste the best study. The stage. The result is the end-of-life elimination system and the "middle-age crisis."

Due to the mechanism of the short book, too much content will affect more recommendations. Friends who need this Android interview review material can [click to join and get it in a free package]

 

 

end

The conversation with that friend is over here. Finally, I hope that my friend can finally get his satisfactory salary and rank through HR. I also hope that everyone can take the momentum of breaking the wind and riding the waves. In one fell swoop, I won a satisfactory offer in next year's spring recruitment.

Guess you like

Origin blog.csdn.net/qq_39477770/article/details/110090681