origin
Seeing that my classmates have been submitting resumes everywhere recently, I thought I would also submit them to see the market, so on 2022-02-28 , I sent my first resume to station B. To be honest, I just wanted to practice my skills. , I didn't expect that I finally took the offer from station B, which is also a good luck.
one side
Technical aspects, about 45 minutes, basically revolving around the highlights written on your resume and your work experience
-
Self introduction
-
what are you responsible for in the project
-
What design patterns have you used, or design patterns that
Android
you often encounter inSingleton mode, strategy mode, chain of responsibility mode (asked about usage scenarios), factory mode, etc.
Android
Observer pattern, Adapter pattern etc in -
Have you done any more difficult modules?
camera2
, custom photo cropView
-
View
What do you know about customizationAnswered some
Path
drawing and handling of touch events -
Android
animationproperty animation,
ObjectAnimator
-
Multi-threaded concurrency (locks, semaphores,
syncnorized
),syncnorized
what is the difference between objects and classes -
ConcurrentHashMap
The principle of thread safetyThe segmented lock used before 1.8 and used after 1.8
synchronized
. As for the specific details, I have not answered it, because I have not seen the source code here. -
jni
, how to locatejni
the crashWhat I answered at the time was to log, because
jni
there are not many places used in the project, of course, itjni
can also be debugged by breakpoints -
Are your applications multi-process? how processes communicate
I only answered this at the time
mmap
, and I talked a little about themmap
principle andbinder
performance comparison. Later, I recalled that I did not answer the communication used in theBroadcast
projectaidl binder
. -
Webview
how tonative
interact-
onUrlLoading
interceptSchema
-
register js method (
addJavascriptInterface
)
-
-
Android
Compilation and packaging processaapt -> class -> dex -> signature
-
Instrumentation
ASM instrumentation, bytecode manipulation
-
性能监控
因为我之前做过一个性能监控库,
cpu
和mem
使用TOP
命令解析,Anr
通过给MainLooper
设置Printer
-
LeakCanary
原理WeakReference
+ReferenceQueue
,加了一些改进点:new
一个弱引用的Object
,等这个Object
确认被回收后再确认Activity
是否正常被回收 -
Jetpack Compose
稍微谈了一下看法,是否在项目中用过
-
算法题:最长公共前缀
LeetCode 14题,easy难度:leetcode-cn.com/problems/lo…
二面
一面结束后5min左右,B站HR就给我打电话过来约了二面
二面也是技术面,20min左右,因为是晚上8点面的,估计人家急着想下班(笑)
-
自我介绍
-
工作职责
-
工作中有什么亮点
-
拍照裁剪业务
-
单元测试库
-
性能监控
-
内存泄漏检测
-
-
单元测试的库是怎么做的
基于
Mockito
和Robolectric
:- 封装了一个反射库用来方便测试
- 做了一个
AutoCloser
类用来自动关闭释放mock的资源,这里提到了使用MockedStatic
,如果在使用完后没有释放,那在下一次使用到同一个类的MockedStatic
的时候会报错,这里我自定义了一个注解@MockedStatic
用来自动mock和释放资源 - 针对kotlin做了一些mock工具,比如说顶层函数的mock(这个在我以前的文章Android-Kotlin单元测试之 如何配合Mockito模拟顶层函数中介绍过)
-
开发模式(流程规范):
开发规范参考了阿里的
Java
规范和Android
规范,选取了一些比较重要的条例和一些自己长时间开发的经验做成了一篇文档 -
崩溃率的优化,做了哪些事情
感觉这里没答好,有点答非所问的意思,我就说了说目前处理bug的一个流程,没有谈到怎么解决一个bug
-
数据打点是怎么做的
我们用的是神策第三方服务
-
内存泄漏工具是怎么做的
这部分同一面
LeakCanary
原理 -
看你之前做过一个
MQTT
协议的客户端,是出于个人兴趣吗是的,当时是想要做一个
IM
应用 -
在项目中有遇到需要3D渲染展示的内容吗
目前没有
-
两个
Activity
跳转时方法执行的顺序一个
Activity
创建是:onCreate -> onStart -> onResume(之后便在屏幕上显示了)假设从
A Activity
跳转到B Activity
:A.onPause -> B.onCreate -> B.onStart -> B.onResume -> A.onStop从
B
返回到A
:B.onPause -> A.onRestart -> A.onResume -> B.onStop -> B.onDestory -
两个
Activity
传递数据可以通过什么方式-
Intent
-
如果是同一个进程的话,可以用全局变量或者单例等
-
SharedPreference
-
文件
-
-
什么时候使用
Service
后台任务,比如说后台播放音乐等,这里提了一下
IntentService
是开了一个子线程的 -
Service
怎么启动,怎么停止-
startService
<--->stopService
-
bindService
<--->unbindService
-
-
包体积优化
清理资源(字体、图片、代码等)
HR面
二面结束后过了2-3天,HR发微信过来恭喜我进入下一轮面试,我问她接下来是还有三面和HR面吗,她回答我说后面就直接是HR面了,说实话我还是挺惊讶的
HR面15min左右,大概就问了一下,为什么要从上家公司离职,我们是一个新部门,处于项目初期,有什么看法之类的,然后问了一下目前的薪资和期望薪资,over~
总结
说实话感觉这次面试太简单了,有点白瞎了我准备了那么多,还做了查漏补缺 ㄟ( ▔, ▔ )ㄏ ,最后祝大家都能找到心仪的工作 (๑•̀ㅂ•́)و✧