当前位置:网站首页>The latest Android interview collection, Android video extraction audio

The latest Android interview collection, Android video extraction audio

2022-07-07 21:50:00 InfoQ

above

This paper hopes to reveal some of the  React  Hidden technical details ,  To help understand some concepts in official documents

Readers can see this as a supplement to the official documentation

The way I write is
put questions to - answer
The way ,  That is, according to the usage rules given in the official documents ,  Put forward Why,  And then we will answer these questions according to the actual debugging Why,  Finally, the system of sorting out these  Why  become  How,  If you  
《Android Summary of learning notes + Latest mobile architecture video + Big Android interview questions + Project actual combat source code handout 》 Free open source Hui Xin search official account 【 Advanced programming 】
  We have a better way of writing ,  Please leave a message to discuss

And for the reading experience ,  I won't paste too much source code ,  Avoid interrupting your readers .

1、Java  relevant

  • Containers (HashMap、HashSet、LinkedList、ArrayList、 Array etc. )

You need to understand how it works , And use it flexibly , Such as : Realize it by yourself  LinkedList、 Two stacks implement a queue , Array implementation stack , Queue implementation stack, etc .

HashMap、HashTable  and  CurrentHashMap  Core differences ( Concurrent ), Secondly, the realization of internal data structure 、 Capacity expansion 、 Access operations , A little deeper   Hash collision , Hash computing , Hash map , Why is the head insertion method , Why expansion is  2  And so on .

  • Memory model
  • Garbage collection algorithm
    (JVM)

JVM  Class loading mechanism 、 Garbage collection algorithm comparison 、Java  Virtual machine structure

When you talk about generational recycling algorithms , It's hard to avoid being asked how the new generation's objects are from the young generation to the old age , And can be used as  root  What are two problems with the object of a node .

1、 Talk about right  JVM  The understanding of the ?2、JVM  Memory area , Which area memory is affected by the open thread ?3、 Yes  Dalvik、ART  What do you know about virtual machines ? contrast ?

ART  The mechanism of  Dalvik  Different . stay Dalvik Next , Every time the app runs , Bytecode needs to pass through the real-time compiler (just in time ,JIT) Convert to machine code , This slows down the efficiency of the application , And in the ART  Environment , When the application is first installed , Bytecode will be precompiled into machine code , Greatly improved the efficiency of the program , At the same time, it reduces the power consumption of mobile phones , Make it a real local application . This process is called precompiling (AOT,Ahead-Of-Time). In this case , Application launch ( For the first time ) And execution will be faster .

advantage :

  • A significant improvement in system performance .
  • Apps start faster 、 Run faster 、 More fluid experience 、 Touch feedback is more timely .
  • Longer battery life .
  • Support for lower hardware .

shortcoming :

  • Machine code takes up more storage space , After bytecode becomes machine code , May increase 10%-20%( But in the app package , Executable code is often just part of . Like the latest  Google+ APK  yes  28.3 MB, But the code is just  6.9 MB.)
  • Applications will take longer to install .

4、 Garbage collection mechanism and call  System.gc() The difference between ?

  • Class loading process
    ( Need to see more , Focus on understanding , It's important for hot fixes and plug-ins )
  • Reflection
  • Multithreading and thread pooling

What are the states of a thread , Which locks , Differences between various locks concurrent programming :synchronized  and  volatile 、ReentrantLock 、CAS  The difference between synchronized  What's the difference between modifying instance methods and static methods .

sleep 、wait、yield  The difference between ,wait  How to wake it up

  • HTTP、HTTPS、TCP/IP、Socket signal communication 、 Three handshakes, four waves

Computer network part :1、TCP  What are the States 2、 Three handshakes 、 Four waves . Why not three times, not twice 3、HTTPS  and  HTTP  The difference between ,HTTPS 2.0 3.0?4、 Browser input a  URL  Press enter network transmission process ?5、 The deeper question may involve network architecture , What's the protocol for each layer ,FTP  Related principles , example :TCP  Once the connection is established , What is the frequency of contract awarding ?

  • Design patterns
    ( Six basic principles 、 Design patterns commonly used in projects 、 Handwritten notes, etc )

1、 The difference between producer mode and consumer mode ?2、 Single mode double lock , Why do you do this ?3、 What design patterns do you know ?4、 What are the commonly used design patterns in the project ?5、 Handwriting producers 、 Consumer model .6、 Handwritten observer mode code .7、 Adapter pattern 、 Decorator mode 、 Similarities and differences in appearance patterns ?8、 Talk about right  java  State machine understanding .9、 Talk about application updates ( Grayscale 、 Force update 、 Partition is updated ?)

  • Breakpoint continuation
  • Java  Four quotes

Strong citation 、 Soft citation 、 Weak reference 、 The difference between virtual references and the usage scenarios . Force quote to  null, Will it be recycled ? Interviewers who ask deeper questions will mix with memory leak detection principles and garbage collection .

  • Java  The generic ,<? super T>  and  <? extends T>  The difference between

Ask generics 、 Generic erase 、 Wildcard related things

  • final、finally、finalize  The difference between
  • Interface 、 The difference between abstract classes

2、Android  relevant

  • Customize  View
  • 1、ViewGroup  Draw order  ( example : Customize  ViewGroup  How to achieve  FlowLayout? How to achieve  FlowLayout  Exchange order )2、  Customize  View  How to achieve the effect of playing billiards ;3、  Customize  View  How to achieve the bowing effect , The realization of Bezier curve principle ?

2. 
Event interception distribution

Event distribution is not directly for you to talk about , It will give you specific scenes , such as  A  nesting  B ,B  nesting  C, from  C  Center Press , A slide out to  A, The process of event distribution , There must be  ACTION_CANCEL  Relevant call time of .

  • Some performance problems solved
    , Practical application in the project .
  • Performance optimization tools
    (TraceView、Systrace、 debugging  GPU  Over drawing  & GPU  Presentation pattern analysis 、Hierarchy Viewer、MAT、Memory Monitor & Heap Viewer & Allocation Tracker  etc. )
  • performance optimization
     ( Talk about the performance optimizations you've done in your own projects )(1)
    The Internet :
     API  Optimize 、 Traffic optimization 、 Weak network optimization (2)
    Memory :
     OOM  Handle 、 Memory leak 、 Memory detection 、 analysis 、Bitmap  Optimize
    LeakCanary  principle , Why do I need to detect memory leaks twice ?
    (3)
    draw
    (4)
    Electric quantity :
     WeakLock  Mechanism 、JobScheduler  Mechanism (5)
    APK  Slimming
    (APK  How to lose weight , Only  armabi-v7a  No problem ? APK  Slimming is basically  100%  Asked by the interview , Maybe it's the reason I mentioned on my resume .)(6)
    Memory jitter
    (7)
    Memory leak
    (8)** Carton  **{ How to detect carton , What's the Caton principle , How to judge whether the page response is stuck or caused by logical processing }
    BlockCanary
      Principle (9)
    performance optimization :
      Layout optimization 、 Over rendering 、ANR  Handle 、 monitor 、 Buried point 、Crash  Upload .(10)
    Startup optimization

Cold start is the foundation of something , There should be lazy loading later , Lost thread pool synchronization , It should be noted that there may be some holes here , How to know the completion of the thread pool .

problem

1、 Start page white screen and black screen to solve ?2、 How to solve the problem of starting too slowly ?3、 Start crash capture ?4、Https  Ask for a slow solution (DNS、 Carrying data 、 Direct access  IP)5 ,  
How to cache yourself (LRUCache  principle )
6 ,  
Graphics and images
:OpenGL ES  Pipeline process 、EGL  The understanding of 、Shader  relevant 7 ,  
SurfaceView、TextureView、GLSurfaceView
  Differences and use scenarios 8 , . 
Animation 、 Differentiator 、 Estimator

Attribute animation 、 Patch animation 、 The difference between frame animation and use scene

9 ,  MVC、MVP、MVVM

The differences between them and various use scenarios , How to choose the right development architecture for yourself .

10 ,  Handler、ThreadLocal、AsyncTask、IntentService  Principle and Application

Handler  Principle of mechanism ,IdleHandler  When to call .

12 ,  
Gradle
(Groovy  grammar 、Gradle  Plug in Development Foundation )

11 ,   Hot repair 、 pluggable
(1、 Talk about right  ClassLoader  The understanding of the 2、 The benefits of parental delegation 3、 Customize  ClassLoader 4、 Why does plugins appear , How to load code , Resource loading , agent  Hook)

12 ,  Activity  Life cycle
;

13 ,  Android  Of  4  Big start mode , Be careful  onNewIntent()  Call to .

14 ,   Tell me about  Android  Four components of ;

15 ,   The idea of component architecture
1、 How to realize componentization step by step from an old project , Main ideas , Examine the ability to structure and think .( There's a lot to think about , What to do with each step , Order matters )2、 Understanding and difference between componentization and modularization ?

16 ,   System packaging process

17 ,  Android  How to store data .
18 ,  SharedPrefrence  Source code and problems ;

19 ,  sqlite
  relevant 1、sqlite  upgrade , Add field statement 2、 Database framework comparison and source code analysis 3、 Database optimization and data migration 4、getWritableDatabase  and  getReadableDatabase  The difference between

20 ,  ListView
  and  
RecyclerView
  difference ?RecyclerView  There are several layers of cache , How to make two  RecyclerView  Share a cache ?1、RecycleView  How to refresh locally . 2、 performance optimization .

21 ,   How to judge a  APP  At the front desk or backstage ?

22 ,   How to apply
Keep alive **? The whole family barrel principle ?**

23 ,   Hybrid development
1、 Hybrid  Have you ever done ? 
example
:Android  adopt WebView call  JS  Code  
example
:JS  adopt WebView call  Android  Code ;2、Hybrid  What is the principle of communication , Did you do any research ?3、 Tell me about the hybrid development technologies you've used ? What are the advantages and disadvantages of each ?

3、Android Framework

  • AMS 、PMS
  • Activity  Start process ,App  Start process
  • Binder  Mechanism
    (IPC、AIDL  Use )( Tell me about  Linux  Upper  IPC  signal communication ,Binder  What are the advantages ,Android  What multiprocess communication mechanisms are available on ?)
  • 1、 What multi process scenarios are encountered in the project ?2、AIDL  What is it? ? What problems have been solved ?3、 Talk about the awareness of process sharing and thread safety ?4、 What is a journey ?
  • Why use  
    Parcelable
    , What are the benefits ?
  • Android  Image display
    Related processes ,Vsync  Signals, etc

4、 Three party source code

  • Glide
     : load 、 cache 、LRU  Algorithm ( How to design a large image loading framework by yourself )(LRUCache  principle )
    2. EventBus
    3. LeakCanary
    4. ARouter

a key :
 Router  principle , How to achieve communication between components , The way of component level calling data .

5.  pluggable
( Principles and schools of different plug-in mechanisms , Advantages and disadvantages . limitations )
6.  Hot repair
7. RXJava
(RxJava  The principle of thread switching )
8. Retrofit
(Retrofit  stay  OkHttp  What's the package on ? The difference between dynamic agent and static agent , How did it happen )
9. OkHttp  and  Volley  The difference between .

1、OkHttp  Source code , Network cache 2、 If you load one from the network  10M  Pictures of the , Talk about the precautions 3、 Why does Android add signature mechanism

5、 Algorithm and data structure

  • Single chain list
    : reverse 、 Insert 、 Delete
  • Double linked list
    : Insert 、 Delete
  • Common sorting of handwriting
    、 Merge sort 、 Heap sort
  • Foreword of binary tree
    、 Middle preface 、 After the sequence traversal
  • Maximum  K  problem
  • Breadth 、 Depth first search algorithm
  • You can brush it  
    LeetCode
     , I will improve myself a lot .
  • String  turn  int.  The core algorithm is three lines of code , But there are many critical conditions , In addition to empty , You also need to pay attention to negative numbers 、Integer  The maximum and minimum boundary of ;
  • How to judge whether a single chain table has rings ?
  • List flip ;
  • Quick line up ;
  • 100  Billion words , Find out the most frequent words . Several solutions are required ;
  • List every  k  Bit reverse order ;
  • Mirror binary tree ;
  • Find a number that appears more than half the times in an unordered array ;
  • Calculate the maximum depth of a binary tree , Non recursive algorithm required .
  • String  How to add .

6、 project  & HR

  • One of the biggest problems and challenges in project development , How did you solve .(95%  Will ask )
  • Talk about the biggest advantages of your development (95%  Will ask )
  • Why did you leave your last company
  • What are your shortcomings ?
  • What benefits can you bring to the company ?
  • Your career plan for the future ?

At the end of the article

A lot of people in the first contact with this industry or in the bottleneck period , There are always problems , For example, after learning for a period of time, I feel that I have no sense of direction , I don't know where to start to learn , I've compiled some information about it , What you need can be shared for free

Here, the author shares dozens of Tencent related to the above technical system diagram 、 headlines 、 Ali 、 Meituan and other companies 2021 Interview questions for , Put the technical points into video and PDF( In fact, it took a lot more energy than expected ), Contains the context of knowledge  +  A lot of details , Due to limited space , Here is a part of it in the form of pictures .

null
null
【 Video tutorial 】

null
God helps those who help themselves , As long as you want to , Big factory offer It's not out of reach ! I hope this article can help you , If there are questions , Please leave a message in the comment area .
原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071447241197.html