Has passed the probation period of byte, this just dare to post out with everybody to do a share. When I got the offer, I was really worried that I would not pass the probation period. Now I am finally relieved, but it is not because I feel all is well after the probation period. I have found that my leaders and colleagues are really nice in these months

My case is in hunan province in 2019 a pair of undergraduate computer science graduate (this condition should be able to add information to a lot of friend), after graduation I have been in changsha, a medium-sized Internet companies do Android development related work, said that “medium-sized companies,” welfare salary than metal, what rules is complete with giant, 996 is not said, always also whole some “health package (raw bitter melon)”, “perseverance (a few minutes of plank, squat what)” what negative incentive punishment. Harm! Say many are tears, right as life “rare” temper.

After all, it is because of this company that I made up my mind to quit naked and run for Dachang in February this year. Of course, I also know that we this condition, really is to have a degree without a degree, talk about technology… It is a long story, so I set a plan to “go back to the countryside to gnathe old”, in fact, is also want to save some expenses, give yourself two months of time, learn to improve themselves, fortunately, parents understand and support (later words I will be a study plan and face through the real question to do a simple arrangement to share with you).

The rest is to cast a wide net to catch more fish and the examination of the interview. At the end of March, I returned to Changsha and rented a room for 800 yuan a month, and began to send resumes. The most began to practice the eyes or took some small and medium-sized companies, recommend if so, they find a job in the future can be understand understand roughly quotation and some core requirements, is very smooth, face the four home, took the three offers, one of which is I think the company after his side too, follow-up directly to refuse, of course, these companies have a bit is, They are not card me this degree of education, so for the back of the big factory, in fact, there is no bottom.

I remember very clearly that I started to post to Dachang on April 4th, because I thought 4 was my lucky number. During this period, I invested in netease, Tencent, Oppo, Byte, Didi and Huawei, all of which were internal promotion channels. Except Huawei, I received interview invitation and passed it for a while, but finally I only got offer from Byte. This is why I have been worried about the practical period after I got the offer. After a thought, may be because in the byte algorithm questions above the answer is better, and then benefited from the byte in March to April when the large-scale expansion, so here recommended to enter the byte partners, must brush algorithm questions, each round will ask, and good answer is extra points.

Well, the face to share to you here, next to share some dry goods, I review brush questions and interview sorting, the content may point more, feel that may be helpful to their partners can collect.

A, the Android

1.Activity

  • 1. Start the Activity
  • 2. OnSaveInstanceState (), the usage time of onRestoreInstanceState
  • 3. Start mode and usage scenario of the activity
  • 4.Activity A jumps to Activity B, and then press the return key
  • 5. To switch between vertical and horizontal screens, press the Home button and the Back button to lock and unlock the screen, jump to the transparent Activity interface, start an Activity with Theme as Dialog, and start the Activity life cycle when the Dialog pops up
  • 6. OnStart and onResume, onPause and onStop
  • 7. Whether the Intent has a limit on the size of the data to be transmitted, and if the amount of data to be transmitted is too large, what are the options
  • 8. When is the Activity’s onNewIntent() method executed
  • 9. Display startup and implicit startup
  • 10. Scheme usage scenario, protocol format, and how to use it
  • 11. Four scenarios of ANR
  • 12. The difference between onCreate and onRestoreInstance when restoring data
  • 13. Way of transferring data between Activty
  • 14. How to start an Activity across apps
  • 15. What is the Activity stack
  • 16. Which Flags are commonly used for activities
  • 17. How is the Activity data saved? How is the saved data recovered after the process is killed

2.Service

  • 1. Service lifecycle, the difference between the two startup modes
  • 2.Service startup process
  • 3. How do services and activities communicate
  • 4. What is IntentService? How does IntentService work
  • 5. How many return values does the onStartCommand method of Service have? What does each stand for?
  • 6. BindService and startService mixed life cycle and how to close

3.BroadcastReceiver

  • 1. Classification and application scenarios of broadcast
  • 2. Differences between the two registration methods of broadcasting
  • 3. Principle of broadcast sending and receiving
  • 4. Difference between local broadcast and global broadcast

4.ContentProvider

  • 1. What is a ContentProvider and how to use it
  • 2. The ContentProvider, ContentResolver, the relationship between the ContentObserver
  • 3. Implementation principle of ContentProvider
  • 4. The advantages of ContentProvider
  • 5. The Uri is what

5.Handler

  • 1. The implementation principle of Handler
  • Can’t create a new Handler for a child thread? Why can’t the main thread create a new Handler
  • When and which class did the main thread’s Looper first call the loop method
  • 3. Cause and solution of memory leakage caused by Handler
  • 4. A thread can have several handlers, loopers, and MessageQueue objects
  • 5. What are the differences in the way Message objects are created?
  • How does message.obtain () maintain the Message pool
  • 6. What methods does the Handler use to send messages
  • 7. Differences between Post and sendMessage of Handler and application scenarios
  • What happens to the message queue after handler postDealy? Suppose the postDelay is 10 seconds and then the postDelay is 1 second
  • 9. What data structure is MessageQueue
  • 10. How do we ensure that there is only one MessageQueue for each thread
  • The role of ThreadLocal in the Handler mechanism
  • 11. What is HandlerThread & benefits & Principles & Usage scenarios
  • 12.IdleHandler and its application scenarios
  • 13. Message barrier, synchronization barrier mechanism
  • 14. Can child threads update the UI
  • 15. Why does Android not recommend child threads accessing the UI
  • 16. Why doesn’t the main thread in Android freeze because of the dead loop in looper.loop ()
  • MessageQueue#next will block when there is no message.
  • 17. How does a looper distinguish between multiple handlers in the Handler messaging mechanism
  • When an Activity has multiple handlers, how do you tell which Handler is handling the current message
  • How do I know which callback to go to when processing a message
  • The difference between 18. Stars. Quit/quitSafely
  • 19. How to implement thread switching through Handler
  • 20. How is Handler associated with Looper
  • 21. How is Looper associated with Thread
  • 22. The stars. The loop () the source code
  • 23. How does MessageQueue’s enqueueMessage() method synchronize threads
  • 24. Internal principles of MessageQueue’s Next () method
  • 25. Whether MainLooper can be used to create handlers in child threads, and whether Looper and Handler must be on the same thread
  • 26. Contact between ANR and Handler

6. The View map

  • 1.View drawing process
  • 2. The MeasureSpec is what
  • MeasureSpec = MeasureSpec = MeasureSpec = child View
  • 4. Customizing Viewwrap_content does not work
  • 5. There are several ways to get the width and height of a View in an Activity
  • 6. Why can’t onCreate get the width and height of View
  • 7.View#post vs. Handler#post
  • 8. Principle of Android drawing and screen refresh mechanism
  • 9. Choreography principle
  • 10. What is double buffering
  • 11.为什么使用SurfaceView
  • 12. What is a SurfaceView
  • 13. Difference between View and SurfaceView
  • 14. Why can SurfaceView be drawn directly by child threads
  • SurfaceView, TextureView, SurfaceTexture, GLSurfaceView
  • 16. Difference between getWidth() and getMeasureWidth()
  • 17. Invalidate() and postInvalidate(
  • 18.Requestlayout, onLayout, onDraw, DrawChild
  • 19. Which is more efficient LinearLayout, FrameLayout or RelativeLayout
  • 20.LinearLayout drawing process
  • 21. Custom View process and matters needing attention
  • 22. How to consider model adaptation for custom View
  • 23. Custom control optimization scheme
  • 24. How to refresh invalidate locally
  • 25.View loading process (setContentView)

7.View event distribution

  • 1.View event distribution mechanism
  • 2. View’s onTouchEvent, OnClickListerner, and OnTouchListener’s onTouch methods are prioritized
  • 3. The difference between onTouch and onTouchEvent
  • 4. When is ACTION_CANCEL triggered
  • 5. Does the event go first to the DecorView or Window
  • 6. Click event is blocked, but want to upload to the following View, how to operate
  • 7. How to resolve View event conflict
  • 8. Consume ACTION_DOWN events in onTouchEvent in ViewGroup. How do ACTION_UP events pass
  • 9. Neither Activity ViewGroup nor View consumes ACTION_DOWN. How is the ACTION_UP event delivered
  • 10. Set click method for parent View and child View at the same time, which one should respond first
  • 11. The call time to requestDisallowInterceptTouchEvent

8.RecycleView

  • 1.RecyclerView multi-level cache mechanism, what is the specific function of each level of cache, and which cache will be used in what scenarios
  • 2. Sliding recycling reuse mechanism of RecyclerView
  • 3. Refresh recycling reuse mechanism of RecyclerView
  • 4. Why pre-layout of RecyclerView
  • 5.ListView and RecyclerView difference
  • 6.RecyclerView performance optimization

9.Viewpager&Fragment

  • 1.Fragment life cycle & Combining Activity life cycle
  • 2. How do activities and fragments communicate with each other
  • 3. Why use Fragment.setarguments (Bundle) to pass parameters
  • 4. The differences between FragmentPageAdapter and FragmentStatePageAdapter and their application scenarios
  • 5. Fragments lazy loading
  • 6.ViewPager2 differs from ViewPager
  • 7.Fragment nesting problem

10.WebView

  • 1. How to improve the loading speed of WebView
  • 2. Interaction between WebView and JS
  • 3. The WebView loopholes
  • 4. JsBridge principle

11. The animation

  • 1. Type of animation
  • 2. The difference between tween animation and attribute animation
  • ObjectAnimator, ValueAnimator and their differences
  • 4.TimeInterpolator is a custom interpolator
  • 5. TypeEvaluator valuations

12.Bitmap

  • 1. Calculation of Bitmap memory usage
  • 2. GetByteCount () & getAllocationByteCount()
  • 3. Compression method of Bitmap
  • 4. Principle of LruCache & DiskLruCache
  • 5. How to design an image loading library
  • 6. I have a very large image. How do I load this large image
  • 7. If you move the image from drawable-xxhdpi to drawable-xhdpi, how will the image memory change?
  • 8. If the image is placed under hdPI, xxhdPI, the loading priority. If 400800,10801920, priority of loading.

13.mvc&mvp&mvvm

  • 1.MVC and its advantages and disadvantages
  • 2.MVP and its pros and cons
  • 3.MVVM and its advantages and disadvantages
  • 4. How does MVP manage the life cycle of presenters and when to cancel network requests

14.Binder

  • 1.Android process and thread relationship, difference
  • 2. Why is IT necessary to conduct IPC and what problems may occur in multi-process communication
  • 3. The IPC mode in Android has several advantages and disadvantages
  • 4. Why Binder is added as the main IPC mode
  • What are Binders
  • 6. The principle of Binder
  • 7. How do Binder drivers copy in kernel space?
  • 7. Specific process of data transmission with Binder
  • 8. Roles of ServiceManager in Binder framework
  • 9. What is AIDL
  • 10. Steps used by AIDL
  • 11. What data types are supported by AIDL
  • 12.AIDL’s key classes, methods and workflows
  • 13. How to optimize AIDL for multiple modules
  • 14. What is the maximum limit of data transmission with Binder, and what problems will result when it is full
  • 15. What are the important steps in Binder driver loading process
  • 16. Differences between system services and services started by bindService
  • 17. The bindService process of the Activity
  • 18. Manual coding with Binder without AIDL

15. Memory leak & Memory overflow

  • 1. What is OOM & what is memory leak and why
  • 2. How do THREADS cause memory leaks and solve the problem?
  • 3. What can I do to rectify the memory leakage caused by Handler
  • 4. How to load Bitmap to prevent memory overflow
  • 5. How is the Presenter layer handled in MVP to prevent memory leaks

16. Performance optimization

  • 1. Memory optimization
  • 2. Start optimization
  • 3. Layout loading and rendering optimization
  • 4. Caton optimization
  • 5. Network optimization

17.Window&WindowManager

  • 1. What is Window
  • 2. What is WindowManager
  • 3. What is ViewRootImpl
  • 4. What is a DecorView
  • 5. The relationship between Activity, View and Window
  • 6. When does a DecorView get added to the Window by WindowManager

18.WMS

  • 1. What is WMS
  • 2. How does WMS manage Windows
  • 3. What is IWindowSession and how is the creation process of WindowSession
  • 4. What is WindowToken
  • 5. What is WindowState
  • 6. How many Android Windows are there? What is the grouping principle
  • 7.Dialog Context can only be the Activity Context, not the Application Context
  • 8. How does the App communicate with SurfaceFlinger
  • How does a View draw pass data to SurfaceFlinger
  • 9. What is the implementation of shared memory
  • 10. How did Relayout apply for Surface from SurfaceFlinger
  • 11. What is Surface

19.AMS

  • 1. What is ActivityManagerService? When was it initialized? What does it do?
  • 2. What is ActivityThread? What is ApplicationThread? Their differences
  • 3. What are Instrumentation? What is the relationship with ActivityThread?
  • 4. How does ActivityManagerService communicate with Zygote processes
  • 5.ActivityRecord, TaskRecord, ActivityStack, ActivityStackSupervisor, ProcessRecord
  • 6. Relationship between ActivityManager, ActivityManagerService, ActivityManagerNative, and ActivityManagerProxy
  • 7. Handwritten implementation of simplified AMS

20. The system starts

  • 1. Android startup process
  • 2. Relationship between SystemServer, ServiceManager, and SystemServiceManager
  • 3. Why not leave incubation to SystemServer instead of designing a Zygote
  • 4. Why Zygote IPC communication mechanism uses socket instead of binder

21.App startup & packaging & Installation

  • 1. Application startup process
  • 2. Apk composition and Android packaging process
  • 3. Signature mechanism of Android, how is signature implemented, and the change of SIGNATURE mechanism between V2 and V1
  • 4.APK installation process

22. The serialization

  • 1. What is serialization
  • 2. Why serialization and deserialization
  • 3. What are the benefits of serialization
  • 4. Difference between Serializable and Parcelable
  • 5. What is serialVersionUID
  • 6. Why display the value specifying serialVersionUID?

23.Art & Dalvik and their differences

  • 1.Art & Dalvik and their differences

Modularization & componentization

  • 1. What is modularity
  • 2. What is componentization
  • 3. Advantages and options of componentization
  • 4. Debug components independently
  • 5. Communication between components
  • 6.Aplication Dynamic load
  • 7. ARouter principle

25. Hot Fixes & plugins

  • 1. Plug-in definition
  • 2. Advantages of plugins
  • 3. Comparison of plug-in frameworks
  • 4. Plug-in process
  • 5. Principle of plug-in class loading
  • 6. Principle of plug-in resource loading
  • 7. Principle of plug-in Activity loading
  • 8. Difference between hot fixes and plugins
  • 9. Principle of thermal repair

26.AOP

  • 1. The AOP is what
  • 2. The advantages of AOP
  • 3. The AOP implementations, APT, AspectJ, ASM, epic, hook
  • 27.jectpack
  • 1.Navigation
  • 2.DataBinding
  • 3.Viewmodel
  • 4.livedata
  • 5.liferecycle

Open source frameworks

  • Okhttp source code flow, thread pool
  • 2. The Okhttp interceptor is different from addNetworkdInterceptor
  • 3.Okhttp responsibility chain mode
  • 4. How to handle Okhttp cache
  • 5.Okhttp connection pool and socket reuse
  • 6. How is Glide bound to the life cycle
  • Glide cache mechanism, memory cache, disk cache
  • 8. Difference between Glide and Picasso
  • 9. LruCache principle
  • Retrofit source code flow, dynamic proxy
  • 11.LeakCanary weak reference, source code flow
  • 12.Eventbus
  • 13.Rxjava

Second, the Java

1.HashMap

  • 1. The principle of a HashMap
  • 2. How to implement put() in HashMap
  • 3. How to implement get() in HashMap
  • 4. Why are HashMap threads unsafe
  • 5. What are the differences between HashMap1.7 and 1.8
  • 6. Why use red-black trees when resolving hash conflicts
  • 7. Red black trees are efficient. Why not use red black trees in the first place
  • 8. Use binary search tree instead of red black tree
  • 9. Why does it take a threshold of 8 to become a red-black tree
  • 10. Why is the threshold for degradation to a linked list 6
  • 11. What are the solutions to hash conflicts
  • 12. Under what conditions will HashMap be expanded
  • 13. How to implement hash functions in HashMap, and what other ways to implement hash functions
  • 14. Why not use hashcode as a hash instead of 16 bits higher or 16 bits lower
  • 15. Why is expansion a power of two
  • 16. What is the time complexity of the list lookup
  • 17. A red-black tree

2.ArrayList

3.Jvm

  • 1. The memory model of the Jvm, what is stored in each
  • 2. Several stages of the class loading mechanism load, verify, prepare, parse, initialize, use, unload
  • 3. Order in which objects are instantiated
  • 4. Classloaders, parental delegates and their advantages
  • 5. Garbage collection mechanism

4. A multithreaded

  • 1. Create a thread in Java, Callable, Runnable, Future, FutureTask
  • 2. Several states of threads
  • 3. Talk about thread deadlocks, how to effectively avoid thread deadlocks?
  • 4. How to achieve synchronization in multi-threading
  • 5. The use, difference and principle of synchronized and Lock;
  • 6. The difference between volatile, synchronized, and volatile? Why not use volatile instead of synchronized?
  • 7. Classification of locks, several states of locks, CAS principle
  • 8. Why is there thread safety? How to keep thread safe
  • 9. Sleep () vs. wait(),run vs. start, Notify vs. Notifyall, lock pool, wait pool
  • Java multithreaded communication
  • 11. Why do Java use thread pools
  • 12. There are several thread pool parameters in Java

5. Note

  • 1. Classification of annotations and underlying implementation principle
  • 2. Custom annotations

6. The reflection

  • 1. What is reflection
  • 2. Related classes of reflection mechanism
  • 3. How to get an instance of Class in reflection
  • 4. How do I get a class property object & constructor object & method object
  • 5.Class. GetField and getDeclaredField, getDeclaredMethod and getDeclaredMethod
  • 6. Pros and cons of reflection

7. The generic

8. Design patterns

(If you want to interview bytes, you can brush the questions in LeetCode.)

The content is a bit doha, the length reason does not give you the personal answer for reference, we can learn according to these questions and general direction. , of course, I must be not all understand and answer do not go up to also have a lot of, also told everyone a point here, in the interview, if you have couldn’t answer the questions, 10 million don’t treat them, so she could be more your ignorance and embarrassing scenes, couldn’t answer it doesn’t matter, you can tell your general train of thought and ideas as possible, You can even interact with the interviewer on the spot and learn from them, but if you can’t, you can say you don’t know how to do it.

When I wrote this post, I just remembered that I wanted to share my study plan with everyone, but I forgot all about it. My own words have made a mind map, it may look more intuitive, really want to students can add me to deduction 10+4715+1546 (trouble, not easy), and some of my reference answers to the interview questions can also be shared with you. Finally, I would like to express my gratitude to my friends who shared a lot of experience in the past. It is because of their sharing that THEY gave me a lot of direction and reference experience, which is the reason why I am writing this article. Finally, I wish all partners will not be disappointed in their efforts, and those who want to change jobs can get their ideal offer.

Finally, some friends may care about my salary, because byte has a secret salary system, here I can only tell you, compared to my last company has double, other benefits what not to mention, finally did not live up to myself.