Android embedded development video! The latest Android interview points in 2021 are sorted out, the content is too real

beginning

Hello everyone, I am Brother G. I am currently working in Jingzhou, but the dry goods still have to be arranged!

There is an explosive learning route for developers abroad. At present, 131 k+ stars have been harvested on Github, and the number of stars ranks 9th among all Github warehouses. Needless to say how hot this warehouse is!

As a programmer, if you don't know this warehouse, you really lose money! In addition, some of our technical experts refer to this warehouse when writing learning routes for fresh graduates.

1. The architecture of the Android system

  • The application of the Android system architecture
    Android will be released together with a series of core application packages, which include email client, SMS short message program, calendar, map, browser, contact management program, etc. All applications are written in JAVA language.
  • The application framework of the Android system architecture
    Developers can fully access the API framework (android.jar) used by the core application. The architecture design of the application simplifies the reuse of components; any application can release its function blocks and any other application can use the released function blocks.
  • System runtime library of Android system architecture
  • Linux kernel of Android system architecture

2. Activity life cycle

image.png

3. Fragment life cycle

  • Fragment life cycle
  • Fragment and Activity life cycle comparison

4. Service life cycle

In the life cycle of Service, commonly used are:

4 manual methods

startService()    启动服务
stopService()    关闭服务
bindService()    绑定服务
unbindService()    解绑服务

5 methods that are automatically called internally

onCreat()            创建服务
onStartCommand()    开始服务
onDestroy()            销毁服务
onBind()            绑定服务
onUnbind()            解绑服务
  1. Manually call startService() to start the service, and automatically call the internal methods: onCreate(), onStartCommand(). If a Service is started multiple times by startService(), then onCreate() will only be called once.
  2. Manually call stopService() to close the service, and automatically call the internal method: onDestory(). If a Service is started and bound, if you use stopService() to close the service without unbinding, the service cannot be stopped.
  3. After manually calling bindService(), internal methods are automatically called: onCreate(), onBind().
  4. After manually calling unbindService(), internal methods are automatically called: onUnbind(), onDestory().
  5. startService() and stopService() can only open and close the Service, and cannot operate the Service. The Service still exists after the caller exits; bindService() and unbindService() can operate the Service. After the caller exits, the Service is destroyed with the caller.

5. Animation in Android

Animations in Android are frame animation, tween animation and attribute animation (after Android 3.0)

Frame animation

Frame animation is the easiest kind of animation to achieve. This kind of animation relies more on perfect UI resources. Its principle is to play individual pictures consecutively to produce an animation effect visually. ; Somewhat similar to the way some software makes gif animations. In some codes, we will also see android: oneshot="false", the meaning of this oneshot is whether the animation is executed once (true) or executed multiple times in a loop.

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:drawable="@drawable/a_0"
        android:duration="100" />
    <item
        android:drawable="@drawable/a_1"
        android:duration="100" />
    <item
        android:drawable="@drawable/a_2"
        android:duration="100" />
</animation-list>

Tween animation

Tween animation can be divided into four forms, namely alpha (fade in and fade out), translate (displacement), scale (zoom size), rotate (rotation).
The realization of tween animation will generally adopt the form of xml file; the code will be easier to write and read, and it is also easier to reuse. The main function of Interpolator is to control the rate of change of the animation, which is the speed of the animation. pivot determines the reference position of the current animation execution

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@[package:]anim/interpolator_resource"
    android:shareInterpolator=["true" | "false"] >
    <alpha
        android:fromAlpha="float"
        android:toAlpha="float" />
    <scale
        android:fromXScale="float"
        android:toXScale="float"
        android:fromYScale="float"
        android:toYScale="float"
        android:pivotX="float"
        android:pivotY="float" />
    <translate
        android:fromXDelta="float"
        android:toXDelta="float"
        android:fromYDelta="float"
        android:toYDelta="float" />
    <rotate
        android:fromDegrees="float"
        android:toDegrees="float"
        android:pivotX="float"
        android:pivotY="float" />
    <set>
        ...
    </set>
</set>

Property animation

6. 4 major components in Android

  • Activity
  • BroadCast Receiver
  • Content Provider
  • service

7. Common layouts in Android

8. Ways of Push Messages

9.Android data storage

  1. Use SharedPreferences to store data; it is a mechanism provided by Android to store some simple configuration information, and uses XML format to store data in the device. It can only be used in the same package, and cannot be used between different packages.
  2. File storage data; file storage is a more commonly used method. The method of reading/writing files in Android is exactly the same as the program that implements I/O in Java. OpenFileInput() and openFileOutput() are provided. Method to read files on the device.
  3. SQLite database stores data; SQLite is a standard database that Android brings, it supports SQL statements, and it is a lightweight embedded database.
  4. Use ContentProvider to store data; mainly used for data exchange between applications, so that other applications can save or read various data types of this Content Provider.
  5. Network storage of data; upload (store) and download (obtain) the data information we store in the network space through the storage space provided to us on the network.

10.Activity startup mode

11. Broadcast registration

12. ANR in Android

13.ListView optimization

14.Android digital signature

15.Android root mechanism

end

The success of the interview is actually an inevitable thing, because I have done enough preparations before that, not only purely brushing the questions, but also brushing some advanced knowledge points of Android core architecture, such as: JVM , High concurrency, multithreading, caching, hot fix design, plug-in framework interpretation, componentized framework design, image loading framework, network, design mode, design ideas and code quality optimization, program performance optimization, development efficiency optimization, design mode, Load balancing, algorithm, data structure, advanced UI promotion, Framework kernel analysis, Android component kernel, etc.

Not only learning documents, video + notes improve learning efficiency, but also stabilize your knowledge and form a good systematic knowledge system. Here, the author shares a video and information analyzed from the perspective of architectural philosophy. I have sorted out years of architectural experience and prepared the latest recording in the past 6 months. I believe this video can bring you different inspirations. reward.

Android Advanced Learning Database

A total of ten topics, including all learning materials for Android advanced, Android advanced video, Flutter, java basics, kotlin, NDK module, computer network, data structure and algorithm, WeChat applet, interview question analysis, framework source code!

image

Dachang Interview Questions

PS: Twenty sets of real Android interview questions for first- and second-tier Internet companies (including BAT, Xiaomi, Huawei, Meituan, and Didi) collected by autumn recruitment and my own Android review notes (including Android basic knowledge points and Android extension knowledge points) , Android source code analysis, summary of design patterns, Gradle knowledge points, summary of common algorithm questions.)

"2017-2020 Byte Beat Android Interview Questions Analysis over the Years"

If you need the PDF version, you can get it yourself!

20464/Android-P7/blob/master/Android%E5%BC%80%E5%8F%91%E4%B8%8D%E4%BC%9A%E8%BF%99%E4%BA%9B%EF%BC%9F%E5%A6%82%E4%BD%95%E9%9D%A2%E8%AF%95%E6%8B%BF%E9%AB%98%E8%96%AA%EF%BC%81.md)**

Guess you like

Origin blog.csdn.net/Sunbuyi/article/details/114025312