takeaway
I have been working in several small companies for almost 5 years. I feel that I have no future, so I want to change my job to a big company. Therefore, I resigned in October last year and began to interview for a big company. I felt that this was not enough, so I began to review with the questions I met in the interview. Finally, I spent 26 days reviewing and successfully joined Bytedance.
Today, I review the arrangement of the interview materials to share with the job hunting friends, I hope to provide some help to you.
Due to the limited space of this article, I have only listed some points of knowledge, and detailed free access to PDF documents is provided at the end of the article.
This PDF includes Activity based, Fragment based, Service based, Broadcast Related to Receiver, ContentProvider, data storage, IPC (key), View, Handler, thread (key), Bitmap, JNI, and design mode.
Activity Basics
What about the Activity lifecycle?
What methods does Activity B call when Activity A starts another Activity? What if B is a transparent theme or a DialogActivity? What does the onSaveInstanceState() method do? When will it be called?
What are the four startup modes and application scenarios of the Activity?
What Flags are commonly used for activities?
What’s the relationship between an Activity and a window or a View?
Activity life cycle changes for horizontal and vertical switching?
How do I start an Activity for another application?
How does the Activity start? (key)
Fragment base correlation
What about the Fragment lifecycle?
Different from the Activity lifecycle?
What’s the difference between an Activity and a Fragment?
The difference between the fragments of the add and replace (Fragment overlap) getFragmentManager, getSupportFragmentManager, the difference between getChildFragmentManager?
FragmentPagerAdapter and FragmentStatePagerAdapter difference and usage scenarios
Service Basics
How about the life cycle of a Service?
What are the two ways to start a Service? What’s the difference?
How can Service not be killed? Can Service start time-consuming operation? How to do?
What system services have you used?
Do you know ActivityManagerService? What role does it play (key points)
Broadcast Receiver is fundamental
How many forms of broadcasting are there? What are the features?
Two ways to register a broadcast?
Do you understand the principle of broadcast sending and receiving? (Binder mechanism, AMS)
ContentProvider is fundamental
What do you know about ContentProvider?
ContentProvider permission management?
How about the relationship between ContentProvider, ContentResolver, and ContentObserver?
Data storage-related
Describe how Android data persistence works?
The application scenarios of SharedPreferences? What to note?
What is the difference between apply and commit in SharedPrefrences?
Do you know anything about transactions in SQLite? Is there a good way to use SQLite to do batch operations?
How do I delete individual fields of tables in SQLite?
What optimizations do I get when I use SQLite?
IPC (Emphasis)
What is the relationship between processes and threads in Android? The difference between them?
How do I enable multiple processes? Can N processes be enabled for an application?
Why is IPC needed?
Possible problems with multi-process communication?
Android IPC, advantages and disadvantages of various ways, why Binder?
What and how does the Binder mechanism work?
What is the role of ServiceManager in Binder framework?
Why do Bundle delivery objects need to be serialized? The difference between Serialzable and Parcelable?
Tell me about an AIDL? How does it work? How to optimize AIDL for multiple modules?
View related
What’s the process of drawing a View?
What is a MotionEvent? How many events are involved? Under what conditions does it occur?
Describe the View event delivery and distribution mechanism?
How to resolve View event conflicts? What is an example from development?
The difference between scrollTo() and scollBy()?
How does Scroller achieve elastic sliding of View?
How does invalidate() differ from postInvalidate()?
What’s the difference between SurfaceView and View?
How does custom View consider model adaptation?
Handler associated
What about the message mechanism Handler? Role? What are the elements? What is the process?
Can a thread create more than one Handler?
The difference between soft references and weak references The cause of memory leaks caused by handlers and the best solution
Why is it not recommended to access the UI on child threads
What happens to message queues when you use Handler’s postDealy?
Can I just new a Handler on a child thread? How to do?
How can messages be created? Which works better? Why is that?
Thread (emphasis) related
What are the benefits of thread pools?
Thread pool: thread pool: thread pool: thread pool: thread pool: thread pool: thread pool: thread pool
So AsyncTask what does IntentService do?
The difference between creating a thread directly in an Activity versus creating a thread in a service
How does ThreadPoolExecutor work?
What is the difference between Handler, Thread, and HandlerThread?
Whether multithreading is always efficient (pros and cons)
If you were asked to do a singleton, what would you do
Is there any other way to wake up a thread besides notify
What is ANR? When does ANR occur? How to avoid it?
How can I quickly locate ANR problems without looking at the code?
Bitmap related
What are some issues to be aware of when using Bitmap?
Will bitmap.recycle () be recycled immediately?
When will it be recycled? If there’s nowhere to use this Bitmap, why isn’t garbage collection just collected?
How much memory does a Bitmap occupy and how much memory does it occupy?
How does LRU work?
Performance optimization (emphasis)
In the image level 3 cache, the image is loaded into memory, and if memory is about to burst, what happens? How to deal with it?
If you load a 500*500 PNG hd image in memory. How much memory should it take up?
WebView performance optimization?
How Bitmap handles large images, such as a 30M large image, how to prevent OOM memory reclamation mechanism and GC algorithm (advantages and disadvantages of various algorithms and application scenarios); GC principles, timing, and GC objects
What’s the difference between a memory leak and an overflow?
What tools does AS have to detect memory leaks
Performance optimization, how to ensure that the application startup does not lag?
How to deal with black and white screen?
Will strong references be reclaimed if they are set to NULL?
The difference between ListView and RecyclerView, ListView adapter is what adapter?
LinearLayout, FrameLayout, RelativeLayout performance comparison.
JNI related
Do you know anything about JNI about how to load NDK libraries?
How to register Native functions in JNI?
What functionality have you implemented with JNI? How do you do that? (Encryption, audio and video, graphics and image processing)
Design pattern correlation
What design patterns do you know?
Talk about MVC, MVP, and MVVM. What’s good and what’s bad?
After encapsulating the P layer, if the P layer data is too large, how to solve the problem? Can you give some examples from Android to tell us what design mode is used?
What are the differences between decorator mode and proxy mode?
How many ways are there to implement the singleton pattern?
What is the purpose of double locking in the slacker style? What is the purpose of two short calls?
Use of some open source framework, introduced a read source code, internal implementation process.
How should fragments be decoupled if used in Adapter?
The last
So that’s my success job-hopping bytes to beat finishing in the review of data, because the space is limited, so just put the topic list, I all the information at hand to sort out and the answer to the above can be free to share, need these information and answers friend, forward can direct messages I [data] or click here to receive free of charge.