The cause of

Looking at my classmates are also throwing resumes everywhere recently, I thought I would like to see the market, so on 2022-02-28, I threw the first resume to B station, to tell the truth, I just want to practice, did not expect to finally accept the offer of B station, is also fate

One side

The technical side, about 45 minutes, is based on the highlights of your resume and your work experience

  • To introduce myself

  • What were you responsible for in the project

  • What design patterns have you used, or have you often encountered in Android

    Singleton pattern, policy pattern, chain of responsibility pattern (ask about usage scenarios), factory pattern, etc

    Android observer mode, adapter mode and so on

  • Have you done any difficult modules

    Camera2, custom photo clipping View

  • What do you know about custom Views

    Answers some Path drawing and touch event handling

  • Android animation

    Property animation, ObjectAnimator

  • Multi-threaded concurrency (lock, semaphore, syncnorized), what is the difference between syncnorized objects and classes

  • ConcurrentHashMap Principle of thread safety

    1.8 before the use of segmented lock, 1.8 after the use of synchronized, as for the specific details did not answer, because really did not read the source here

  • Jni, how to locate JNI crash

    I replied to log, because jNI is not used much in the project, of course, JNI can also be debug breakpoint

  • Is your application multi-process? How do processes communicate with each other

    I only answered mMAP at that time, and talked a little about mMAP principle and performance comparison of binder. Later, I remembered that Broadcast and AIDL Binder communication used in the project did not answer

  • How do Webview and Native interact

    • OnUrlLoading intercept Schema

    • Register javascript methods (addJavascriptInterface)

  • Android builds the packaging process

    Aapt -> class -> dex -> signature

  • Insert the pile

    ASM staking, bytecode operation

  • Performance monitoring

    Because I have done a performance monitoring library before, CPU and MEM use the TOP command to resolve, Anr set Printer by MainLooper

  • LeakCanary principle

    WeakReference + ReferenceQueue, added some improvement points: new a WeakReference Object, and confirm whether the Activity is recovered normally after this Object is confirmed to be recovered

  • Jetpack Compose

    I talked a little about whether it was used in the project

  • Algorithm: The longest public prefix

    LeetCode 14题 easy difficulty: leetcode-cn.com/problems/lo…

Second interview

About 5 minutes after the first meeting, HR at station B called me to make an appointment for a second interview

The second meeting is also a technical meeting, which takes about 20 minutes. Since the meeting is at 8 p.m., I guess he is eager to leave work. (Laughter)

  • To introduce myself

  • Job responsibilities

  • What are the highlights of the job

    • Photo cropping service

    • Unit test library

    • Performance monitoring

    • Memory leak detection

  • How does the unit test library work

    Based on Mockito and Robolectric:

    1. Encapsulates a reflection library for easy testing
    2. Made aAutoCloserClass to automatically close the resource that releases mocks, as mentioned hereMockedStaticIf it is not released after it is used, it will use the same class next timeMockedStaticI have a custom annotation here@MockedStaticUsed to automatically mock and free resources
    3. Mock tools for Kotlin, such as mocks for top-level functions (this was covered in my previous article Android-Kotlin Unit Tests how to Mockito Mocks top-level functions)
  • Development pattern (process specification) :

    The development specification referred to Ali’s Java specification and Android specification, and selected some important regulations and some of my own long-term development experience to make a document

  • Crash rate optimization, what is done

    I feel that I did not answer well here, which is not what I asked. I just said a process of dealing with bugs at present, but did not talk about how to solve a bug

  • How does data processing work

    We use a third party service

  • What does the memory leak tool do

    This is part of the LeakCanary principle

  • See you have done an MQTT protocol client before, is it out of personal interest

    Yeah, I wanted to make an IM app

  • Is there anything in the project that needs to be rendered in 3D

    There is no

  • The order in which methods are executed when two activities jump

    An Activity is created: onCreate -> onStart -> onResume (which is then displayed on the screen)

    Assume A jump from an Activity to an Activity: A. pause -> B. create -> B. start -> B. Resume -> A. stop

    Return from B to A: B.pause -> A.onan restart -> A.onan Resume -> B.onan stop -> B.onan story

  • How can two activities pass data

    • Intent

    • If it is the same process, you can use global variables or singletons, etc

    • SharedPreference

    • file

  • When to use Service

    For background tasks like playing music in the background, IntentService starts a child thread

  • How do I start and stop a Service

    • startService <—> stopService

    • bindService <—> unbindService

  • Package volume optimization

    Clean up resources (fonts, images, code, etc.)

HR side

Two or three days after the second interview, HR sent me a wechat message to congratulate me on entering the next round of interview. I asked her if there were three more interviews and HR interviews, and she answered me that HR interviews would be directly followed. To be honest, I was quite surprised

HR met with her about 15 minutes later and asked her why she resigned from the previous company. We are a new department and in the early stage of the project, what do you think? Then she asked her current salary and expected salary, over~

conclusion

Well (▔, ▔)ㄏ, AND I wish everyone would find a job which is ̀ㅂ•́) ▔