An Android architect who has worked for Alibaba for ten years, summed up the latest collection of real high-frequency interview questions from first-tier companies such as Alibaba, Tencent, Byte, JD, etc. in 2020, as well as sharing experience

Foreword:

The information in this article is provided by the architect of Alibaba for ten years. It is a pure dry goods article. It summarizes some of the interview questions collected in the latest 2020 (all organized into documents with answers), covering Alibaba, Tencent, ByteDance, Jingdong, Real Android interview questions from Huawei and other major manufacturers, learning routes from senior architects, and Android architecture documents.

Whether you are interviewing a major company or an ordinary Internet company, these interview questions are definitely helpful to you. After all, major companies must be the benchmark for the development of the industry. Interviewers from many companies will also study the interview questions of major companies. It will also help your architect's path, and there is a detailed learning plan in the article, which will bring you a different sense of reading.

Dry goods offer:

The first part: (Android intermediate and advanced articles)

1. Android basics:

1. What is Activity?
2. Please describe the life cycle
of Activity 3. Common Activity types are FragmentActivitiy, ListActivity, TabAcitivty, etc. Please describe the life cycle of Activity
4. How to save the state of Activity or (How to save data when Activiy is restarted?)
5. Which methods are inevitably executed when jumping between two activities?
6. Activity life cycle when switching between horizontal and vertical screens (★★★★)
7. How to set an activity to the style of a window
8. How to exit the activity? How to safely exit an Application that has called multiple activities?
9. What is the difference between singletop and singletask in the four activation modes of Activity ? The general bookmark usage mode is singletop, so why not use singletask?
11. What is the difference between Context, Activity and Appliction in Android? (★★)
12. To transfer data between two activities, besides intent, broadcast receiver, content provider, what else?
13. What is Context? , How many contexts does an application have (2019.5.5) (★★)
14. How to transfer values ​​between activities and between activity and service? Can pictures be transferred?
15. Is the service executed in the main thread, and can time-consuming operations be executed in the service? (★★)
16. How does Activity bind to Service, and how to start its corresponding Service in Activity?
17. Please describe the life cycle of Service (★★★)
18. What is IntentService? What are the advantages? (★★★)
19. Please describe BroadcastReceiver (★★)
20. How to register and use BroadcastReceiver in manifest and code
21. Life cycle of BroadCastReceiver
22. Please introduce how ContentProvider realizes data sharing (★★★)
23. Why use ContentProvider? What is the difference between it and sql implementation? (★★★)
24. Talk about the relationship between ContentProvider, ContentResolver, and ContentObserver (★★★★)
25. Use contentProvider to get all local audio files (Shanghai) (★★★)
26. How does ListView improve its efficiency? (★★)
27. When the ListView data set is changed, how to update the ListView
28. How to realize the paging loading of the ListView (★★★★★)
29. Can the ListView display multiple types of items (★★)
30. How to locate the ListView To the specified position
31. How to embed ListView in ScrollView (★★★★)
32. How to optimize pictures in ListView ( ★★)
33. How to cause the problem of picture misalignment in ListView (★★★)
34. How to refresh the data of a single item in the ListView without refreshing the data of the entire ListView?

image

2. Android Advanced:

1. How to analyze the performance of Android applications (★★★★)
2. Under what circumstances will cause memory leaks (★★)
3. How to avoid OOM exceptions (★★★★)
4. How to catch uncaught exceptions in Android (★★★)
5. What is ANR? How to avoid and solve ANR (★★★★★)
6. What are the ways of communication between Android threads (★★★)
7. The difference between Devik process, linux process and thread (★)
8. Describe the Android system architecture ?
9. How do android applications limit memory? How should we reasonably use memory? (★★★★)
10. What is the structure of android application? (★★★★)
11. Please explain the difference between the permissions of the Android program when it is running and the file system permissions? (★★★)
12. The working method and principle of Framework, how does Activity generate a view, and what is the mechanism? (★★)
13. What is the difference between multi-thread communication and multi-process communication, and how to realize each? (★★★★★)
14. Talk about the design patterns and usage scenarios you know.
15. The characteristics
of the java language and OOP ideas. 16. Talk about the thread creation method in java and the working principle of the thread pool.
17. Talk about the handler principle
18. Memory leak scenarios and solutions
19. How to avoid OOM?
20. Talk about the startup mode and life cycle of the Activity, the life cycle of two Activity jumps, if one Activity jumps to the other 22 .Activity21. Press the Home button again to return to the life cycle of Activity what is it like
23. Start mode
24. OnRestart call scenario
25. Do you know SurfaceView and what is it? What is his inheritance method? The difference between it and View (from the perspective of source code, such as loading, drawing, etc.).
26. How to keep the process alive?
27. Tell me what is the difference between cold start and hot start, how to optimize, usage scenarios, etc.
28. Why does the cold start have a white screen and black screen problem?
29. Threads in Android have those, principles and respective characteristics
30. Reasons for ANR
31. Three-level cache principle
32. LruCache underlying implementation principle:
33. Tell me about your understanding of the Collection class.
34. The ratio of the old generation to the new generation of
JVM 35. The relationship between jvm, jre and jdk? JDK (Java Development Kit) is a product for Java developers and is the core of the entire Java, including the Java runtime environment JRE, Java tools and Java basic class libraries.
36. Talk about your understanding of JNIEnv and JavaVM?
37. The difference between Serializable and Parcable?

image

3. Android source code related analysis:

  • Android animation framework implementation principle
  • The difference between the API of each version of Android
  • The difference and connection of Requestlayout, onlayout, onDraw, DrawChild
  • The difference and use of invalidate and postInvalidate
  • The difference between Activity-Window-View
  • Talk about the understanding of Volley
  • How to optimize custom View
  • How does the low version SDK implement the high version api?
  • Describe the flow of a network request
  • HttpUrlConnection and okhttp relationship
  • Understanding of Bitmap objects
  • looper architecture
  • The working principle of ActivityThread, AMS, WMS
  • How does custom View consider model adaptation
  • Custom View events
  • What is the difference between AstncTask+HttpClient and AsyncHttpClient?
  • LaunchMode application scenarios
  • How to use AsyncTask?
  • SpareArray principle
  • Please tell me how ContentProvider realizes data sharing?
  • Several ways of communication between AndroidService and Activity
  • What is the principle and function of IntentService?
  • Talk about the relationship between Activity, Intent, and Service
  • The difference between ApplicationContext and ActivityContext
  • Is the SP process synchronized? Is there any way to achieve synchronization?
  • Talk about the use of multithreading in Android
  • Process and Application life cycle
  • How to know the size of the view when encapsulating the View
  • RecycleView principle
  • The role and understanding of AndroidManifest

image

The second part of advanced development technical interview questions

1. Picture:

1. Picture library comparison

2. LRUCache principle

3. The principle of image loading

4. How to implement the picture library by yourself?

5. Glide source code analysis

6. What cache does Glide use?

7. How to control the size of Glide memory cache?

image

2. Network and security mechanism:

1. Network framework comparison and source code analysis

2. How to design the network request framework by yourself?

3. Network request cache processing, how okhttp handles network cache

4. Load a 10M picture from the network, and talk about the precautions

5. TCP's 3-way handshake and four waved hands

6. The difference between TCP and UDP

7. Application of TCP and UDP

8. HTTP protocol

9. The difference between HTTP 1.0 and 2.0

10. HTTP message structure

11. The difference between HTTP and HTTPS and how to achieve security

12. How to verify the legitimacy of the certificate?

13. Where is symmetric encryption and asymmetric encryption used in https? Do you have any understanding of encryption algorithms (such as RSA)?

14.How does the client determine that the message sent by itself was received by the server?

15. Talk about your understanding of WebSocket

16. The difference between WebSocket and socket

17. Talk about your understanding of Android signatures.

18. Please explain why Android needs to add a signature mechanism?

19. Video encryption transmission

20. How is the App sandboxed, and why do you want to do it?

21. Authority management system (how is the underlying authority granted)?

image

3.Database:

1. Sqlite upgrade, increase the statement of the field

2. Database framework comparison and source code analysis

3. Optimization of the database

4. Database data migration issues

image

4.Pluginization, modularization, componentization, hot fix, incremental update, Gradle:

1. Understanding of hot repair and plug-in

2. Analysis of plug-in principle

3. Modularization (benefits, reasons)

4. Hot repair, plug-in

5. Understanding of project componentization

6. Describe what happened after clicking the build button of Android Studio

image

5. Architecture design and design patterns:

1. Talk about your understanding of Android design patterns

2. MVC MVP MVVM principle and difference

3. What design patterns do you know?

4. Commonly used design patterns in projects

5. Handwritten producer/consumer model

6. Write the code for the observer mode

7. What are the similarities and differences between adapter mode, decorator mode and appearance mode?

8. Some open source frameworks used, introduce an internal implementation process that has seen the source code.

9. Talk about the understanding of RxJava

10. Rxjava send event steps

11. The role of RxJava, the advantages and disadvantages compared with the usual asynchronous operations

12. Talk about the function of EventBus, how to implement it, and the way to replace EventBus

13. How to design an App's overall architecture from 0?

14. Talk about an application that you think is currently popular and design it (for example: live streaming APP, P2P finance, small video, etc.)

15. Talk about understanding of java state machine

16. How should Fragment be decoupled if used in Adapter?

17. Binder mechanism and underlying implementation

18. How is the application update done? (Answer: Grayscale, mandatory update, sub-regional update)?

19. Implement a Json parser (you can improve the speed through regularization)

20. Statistics start time, standard

image

6. Performance optimization:

1. Start the app to optimize the black and white screen

2. Stable-memory optimization

3. Smooth-Caton optimization

4. Saving-power consumption optimization

5. Installation package-APK slimming

6. Cold start and hot start

7. Scenarios and solutions for memory leaks

8. Bitmap optimization

9. The principle of LRU

10.Webview optimization

11.How to avoid OOM?

image

7.Android Framework

1. Android system architecture

2. View's event distribution mechanism? How to resolve sliding conflicts?

3. View drawing process?

4. Cross-process communication

5. What is the Android system startup process?

6. To start a program, you can click the icon on the main interface to enter, or you can jump from a program. What is the difference between the two?

7. Explanation of important terms in the AMS family

8. Some open source frameworks used, introduce an internal implementation process that has seen the source code.

image

8.Android excellent tripartite library source code:

1. The underlying framework of the network: OkHttp implementation principle

2. Network packaging framework: Retrofifit implementation principle

3. Responsive programming framework: RxJava implementation principle

4. Picture loading framework: Glide implementation principle

5. Event bus framework: EventBus realization principle

6. Memory leak detection framework: LeakCanary implementation principle

7. Dependency injection framework: ButterKnife implementation principle

8. Rely on the global management framework: Dagger2 implementation principle

9. Database framework: GreenDao realization principle

image

Android senior architect learning planning route:

image

As an Android architect, these are the key knowledge points of Android:

1. Advanced UI, custom View

2. NDK development

3. Data structure and algorithm:

4. Principles of Java Kernel

5.Flutter

6. Performance optimization

The knowledge of UI is currently the most users. The Android introductory training that was so popular that year, you can find a good job by learning this little piece of knowledge.

However, it is clear that it is far from enough now. Reject the endless CV, go to the actual project in person, read the source code, and study the principle!

image

2. NDK development

Audio and video, artificial intelligence, these are the development trends that cannot be blocked in the future. We can look at those recruitment positions on Liepin.com, and the salary required to be proficient in NDK is 30-60K+. Don't miss it for those who are pursuing high-paying positions

image

3. Data structure and algorithm:

Bytedance interview, but the algorithm failed and was rejected. Just want to change to a big factory that does not require high algorithms?

As a result, I went to Alibaba, Tencent, Huawei, Xiaomi and other companies for interviews, but they were all rejected!

image

4. Principles of Java Kernel

100%, all companies, large and small, must ask for interviews

image

5.Flutter

It's been more than a year, you don't have to use it for work. But if you go out for an interview (the junior level rarely requires it), you will definitely ask.

Regarding whether Flutter is the future or not, I can’t tell you for sure. All I can be sure of is that you are going to interview for high-paying positions. You have to master this mainstream new technology. (The most important thing for major manufacturers is your basics and technical level. Learning ability.)

image

6. Performance optimization

I heard that the last elimination system of large companies is specially prepared for employees with poor code quality and low performance. How to write high-performance code? How to perform performance tuning?

image

In addition to the above information, the editor has also compiled the Android core advanced technology PDF documents, and the analysis of the real BAT interview questions are shared with everyone for free. Just click here to get direct access.

image

image
This article has been featured GitHub, need the text information is also available Click here to GitHub for free download.

It is not easy to organize, friends who feel helpful can help, like, share and support the editor~

Quick start channel: (click here) to download! Full of sincerity! ! !

Your support, my motivation; I wish you all a bright future and constant offers! ! ! Remember Sanlian!
Insert picture description here

Guess you like

Origin blog.csdn.net/m0_46657043/article/details/110429757