当前位置:网站首页>2022 latest Android interview written examination, an Android programmer's interview experience
2022 latest Android interview written examination, an Android programmer's interview experience
2022-07-05 18:40:00 【InfoQ】
Preface

1. Routing in componentization 、 The realization of buried point
- The first is the page jump between components (Activity To Activity, Fragment To Fragment, Activity To Fragment, Fragment To Activity) As well as data transfer during jump ( Basic data types and serializable custom class types )
- The second is the call of custom classes and methods between components ( Components provide services to the outside )
- Code buried point: Call... When an event occurs SDK The corresponding interface inside sends buried point data , Baidu statistics 、 umeng 、TalkingData、Sensors Analytics The third-party data statistics service providers mostly adopt this scheme
- Full buried point: Full buried point refers to Web page /App All that comes from within 、 The act of satisfying a condition , All reports to the background server
- Visual burying point: Through visualization tools ( for example Mixpanel) Configure the collection node , stay Android The end automatically analyzes the configuration and reports the buried point data , So as to realize the so-called automatic embedding point
- No burying point: It doesn't really need to be buried , It is Android The terminal automatically collects all events and reports the buried point data , Filter out useful data in the back-end data calculation
2.Hook And pile insertion technology

- want root jurisdiction , direct Hook System , Can kill all App.
- nothing root jurisdiction , But only Hook Oneself app, For other systems App incapable of action .
3.Android Signature mechanism of ?
- A summary of the news: On message data , Perform a one-way Hash function , Generate a fixed length of Hash value
- digital signature: A method of storing message signatures in electronic form , A complete digital signature scheme should consist of two parts : Signature algorithm and verification algorithm
- digital certificate: A certificate authorized (Certificate Authentication) Central digital signature file containing public key owner information and public key
4.Android5.0~10.0 A big change between
- MaterialDesign Design style
- Support 64 position ART virtual machine (5.0 To launch the ART virtual machine , stay 5.0 Before is Dalvik. The difference between them is :Dalvik, Each run , Bytecode needs to be converted into machine code by an instant compiler (JIT). ART, The first time I installed the app , Bytecode will be precompiled into machine code (AOT))
- The notification details can be designed by users themselves
- Dynamic authority management
- Support fast charging switching
- Supports folder drag and drop applications
- Camera new professional mode
- Multi window support
- V2 Signature
- Enhanced Java8 Language patterns
- Night mode
- Optimization notification : Notification channels (Notification Channel) Notice sign Sleep Notification timeout Notification settings Notice to clear
- Picture in picture mode : In the list Activity Set up android:supportsPictureInPicture
- Background restrictions
- Auto fill frame
- system optimization
- And so on
- indoor WIFI location
- “ bang ” Screen support
- Security enhancements
- And so on
- Night mode : All apps, including mobile phones, can set the dark mode for them .
- Desktop mode : Offer something similar to PC Experience , But it was far substitute PC.
- Screen Recording : By long press “ Power Supply ” Menu " Screenshot " To open .
5. Under the said Measurepec This class
- UNSPECIFIED: The parent container is not right View There are any restrictions , How big, how big . It is often used inside the system .
- EXACTLY( Accurate model ): The parent view specifies an exact size for the child view SpecSize. Corresponding LyaoutParams Medium match_parent Or specific values .
- AT_MOST( Maximum mode ): The parent container specifies a maximum size for the child view SpecSize,View The size of cannot be greater than this value . Corresponding LayoutParams Medium wrap_content.

6. Please give an example of Android Layout types are commonly used in , And describes its usage and typesetting efficiency
- Traditional layout ( To write XML Code 、 Code generation ):
- Frame layout (FrameLayout):
- Linear layout (LinearLayout):
- Absolute layout (AbsoluteLayout):
- Relative layout (RelativeLayout):
- Table layout (TableLayout):
- New layout ( Visual drag and drop control 、 To write XML Code 、 Code generation ):
- Constrained layout (ConstrainLayout)
- For nested layers View for , Its typesetting efficiency :LinearLayout = FrameLayout >> RelativeLayout
7. difference Animation and Animator Usage of , Summarize its principle
- Types of animation: The former has only transparency , rotate , translation , Telescopic 4 Species attribute , And for the latter , As long as it is the property of the control , And there are setter The methods of the attribute can perform a dynamic change effect on the attribute .
- Operational objects: The former can only UI Component execution animation , But attribute animation can animate almost any object ( Whether it's on the screen or not ).
- Animation playback order: stay Animator in ,AnimatorSet It is through playTogether()、playSequentially()、animSet.play().with()、before()、after() These methods are used to control multiple animations to work together , So as to achieve accurate control of the animation playback sequence
8. What image loading libraries have been used ?Glide Where is the source code design subtle ?
- Image loading Library :Fresco、Glide、Picasso etc.
- Glide The subtlety of the design is :
- Glide Life cycle binding: You can control the loading status of the picture to synchronize with the life cycle of the current page , Make the whole loading process start with the state of the page / recovery , stop it , The destruction
- Glide Cache design: adopt ( Three level cache ,Lru Algorithm ,Bitmap Reuse ) Yes Resource Cache design
- Glide The complete loading process: use Engine The engine class exposes a series of methods for Request operation
9. How to bypass the 9.0 Limit ?

10. How to do this for application update ? ( Grayscale , Force update 、 Sub regional update )
- Get the online version number through the interface ,versionCode
- Compare Online versionCode And local versionCode, The update window pops up
- download APK file ( File download )
- install APK
- Find a single channel to launch a special version .
- Upgrade the platform , It is allowed to push upgrade notifications and even force version upgrades for some users .
- Open a separate download portal .
- Both versions of the code hit app In the bag , And then in app End implant test framework , Used to control which version is displayed . The test framework is responsible for communicating with the server side api signal communication , Controlled by the server app On A/B Distribution of versions , A specified group of users can see A edition , Other users see B edition . The server will have corresponding reports to display A/B Quantity and effect comparison of versions . Finally, it can be controlled by the background of the server , All users switch online to A perhaps B edition ~
- Either way, you need to do a good job of version management , Assign a special version number to distinguish . Of course , Since it's gray scale , Data monitoring ( General data 、 New feature data 、 Main business data ) We still have to do it in place , The data pile to be driven should be driven . also , Grayscale version should have the ability to recover , Generally, it is forced to upgrade to the next official version .
11. Will use Kotlin、Fultter Do you ? Talk about your understanding
- Kotlin Is a cross platform with type inference , General purpose programming language for static types . Kotlin Aim at and Java Full interoperability , Of its standard library JVM Versions depend on Java Class library , But type inference allows its syntax to be more concise .
- Flutter By Google Create an open source mobile application development framework . It is used for development Android and iOS Applications for , As well as Google Fuchsia The main way to create an application
- About kotlin Importance , I believe you can experience in daily development , Apply to actual development , Grammar sugar needs to be avoided ( For example, single column mode 、 A null value judgment 、 Higher order functions, etc )
- as for Flutter, at present Google The official documents are not perfect , There are few projects written in this language on the market , If you need to be specific , Please refer to the official documentation
The end of the
- Mind map
- Performance optimization learning notes


- Performance optimized video
- When you have a learning path , What to learn , I also know how to go in the future , If you see too much theory, you have to practice it .
边栏推荐
- Record a case of using WinDbg to analyze memory "leakage"
- [utiliser Electron pour développer le Bureau sur youkirin devrait]
- 小程序 修改样式 ( placeholder、checkbox的样式)
- Notes on common management commands of openshift
- 开户注册股票炒股安全吗?有没有风险的?靠谱吗?
- English sentence pattern reference
- 【在优麒麟上使用Electron开发桌面应】
- Linear table - abstract data type
- 瞅一瞅JUC提供的限流工具Semaphore
- LeetCode 6109. 知道秘密的人数
猜你喜欢
SAP feature description
[HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD
如何写出好代码 - 防御式编程
使用JMeter录制脚本并调试
Idea configuring NPM startup
vs2017 qt的各种坑
ViewPager + RecyclerView的内存泄漏
Memory leak of viewpager + recyclerview
LeetCode 6109. 知道秘密的人数
Insufficient picture data? I made a free image enhancement software
随机推荐
Is it safe to make fund fixed investment on access letter?
音视频包的pts,dts,duration的由来.
LeetCode 6109. Number of people who know the secret
7-2 保持链表有序
Solutions contents have differences only in line separators
开户注册挖财安全吗?有没有风险的?靠谱吗?
关于服装ERP,你想知道的都在这里了
The 11th China cloud computing standards and Applications Conference | cloud computing national standards and white paper series release, and Huayun data fully participated in the preparation
ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习
《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!
小程序 修改样式 ( placeholder、checkbox的样式)
Notes on common management commands of openshift
金太阳开户安全吗?万一免5开户能办理吗?
Quickly generate IPA package
Reptile 01 basic principles of reptile
7-1 链表也简单fina
线性表——抽象数据类型
Use QT to traverse JSON documents and search sub objects
ClickHouse(03)ClickHouse怎么安装和部署
Is it safe to open an account and register stocks for stock speculation? Is there any risk? Is it reliable?