Android development menu! A selection of daily interview questions for Android senior engineers

Preface

This article is mainly to share the interview experience in the first half of this year. I have been working in a large factory for three months. Recently, many companies have started autumn recruitment. I also wish everyone a smooth interview in the second half of 2020 and get the ideal offer. !

I had a lot of thoughts during the time when I was looking for a job. I summarized some interview experience and life thinking to share with you.

Introduction to JNI

JNI (English abbreviation of Java Native Interface), translated as Java Native Interface. It is one of the many development technologies of Java, which is intended to use native code to provide more efficient and flexible expansion of Java programs. Although Java has always been known for its good cross-platform, but the real cross-platform is none other than C/C++, because 90% of the world's systems are based on C/C++. At the same time, the cross-platform of Java sacrifices efficiency in exchange for compatibility with multiple platforms, so JNI is one of the mainstream implementations of this cross-platform.

In short, JNI is a technology, a technology for communication between Java and C/C++. First, let's review the Android system architecture diagram.

Let's briefly introduce the role of each layer.

Linux layers

Linux kernel

Since the Android system is constructed based on the Linux kernel, Linux is the foundation of the Android system. In fact, Android's hardware drivers, process management, memory management, and network management are all in this layer.

Hardware abstraction layer

Hardware Abstraction Layer (Hardware Abstraction Layer abbreviation). The hardware abstraction layer mainly provides a standard display interface for the upper layer and provides display device hardware functions to the higher-level Java API framework. HAL contains multiple library modules, each of which implements an interface for a specific type of hardware component, such as a camera or Bluetooth module. When the framework API requires access to the device hardware, the Android system will load the corresponding library module for the hardware component.

System runtime and runtime environment layer

Android Runtime

Before Android 5.0 (API 21), the Dalvik virtual machine was used, which was later replaced by ART. ART is the operating environment of the Android operating system, which executes dex files by running a virtual machine. Among them, the dex file is a bytecode format specially designed for Android. Android is packaged and run as the dex file, and the Android toolchain (a compilation tool) can compile Java code into the dex bytecode format. The conversion process is as follows .

As shown above, Jack is a kind of compilation tool chain that can compile Java source code into DEX bytecode so that it can run on the Android platform.

Native C/C++ library

Many core Android system components and services are written in C and C++. In order to facilitate developers to call these native library functions, Android's Framework provides corresponding APIs. For example, you can access OpenGL ES through the Java OpenGL API of the Android framework to support drawing and manipulating 2D and 3D graphics in the application.

Application framework layer

The most commonly used components and services of the Android platform are in this layer, which is a layer that every Android developer must be familiar with and master, and is the foundation of application development.

Application layer

Android system apps, such as email, SMS, calendar, Internet browsing, and contacts. We can directly call the App of the system just like calling the Java API Framework layer.

Finally, I sent the benefits. Now follow me and join the group chat to get the source code analysis, custom View, animation implementation, architecture sharing, etc.
The content is moderately difficult and concise. It only takes more than ten minutes to read every day.
You can discuss with me, welcome to join the group to discuss, there are flutter-low-level development-performance optimization-mobile architecture-senior UI engineer-NDK related professionals and video teaching materials, and there are more interview questions waiting for you to
pick up and
click on GitHub to receive
Recording video image.png

81.md)**
[External link image is being transferred...(img-SUWQmpgW-1611136296896)]

Guess you like

Origin blog.csdn.net/a132445/article/details/112906954