preface

This phenomenon is very normal, because looking for a programmer, of course, hope he can do as much business as possible, preferably like the robot cat, everything can be done. However, the current business did not expand to such a large scale, may just join the team, can only help the old staff, which is very common in the big factory.

However, once dachang team received the demand, determined to expand the business, the action is to pour their best, the whole army charge, this kind of time, usually accumulated “rocket building” “dragon slaying” will come into play. If there is no such accumulation of technology, you will not be able to catch the fighter, until someone else has made it, your team has not made it, or you cannot use it at all, the day lily will be cold.

Whoever can handle the sophisticated and difficult business as soon as possible can become a leader. Ali’s Double 11 concurrent problems and 12306’s Spring Festival rush tickets problems, these businesses with fierce demand and large scale, have to rely on usually not easy to use, design from the underlying principles, improve the technology, by engineers to approach the performance limit step by step, optimize user experience to achieve.

Only to improve their own learning motivation, learning perseverance, learning ability, through the improvement of learning power to provide a source of innovation, continuous leap, continuous development. In this knowledge explosion society, the speed of learning should be greater than the speed of knowledge change, only in this way, can not be eliminated by the society. Only through unremitting learning, broaden their thinking, change the view of things, change their subjective understanding, dialectical, comprehensive view of the problem, improve their own life value, ideal and ambition, with sincerely desire to achieve the goal to inspire themselves. The following is prepared for you in the **Android advanced topics to receive the way “join the exchange group”, I hope you can check the missing, improve their own. 台湾国

1. Activity lifecycle?

onCreate() -> onStart() -> onResume() -> onPause() -> onStop() -> onDetroy()

2. Service life cycle?

There are two ways to start a service: startService() and bindService(). Different startup modes have different life cycles.

StartService () calls startService() –> onCreate()–> onStartConmon()–> onDestroy(). This way to start, need to pay attention to a few problems, first: When we call startService,onCreate() will only be called once, and onStartConmon() will be called multiple times. When we call stopService(), OnDestroy () is called to destroy the service. OnStartConmon () : if the intent is null, the intent is null. If the intent is null, the intent is null.

BindService () is used to bind a service. BindService –>onCreate()–>onBind()–>unBind()–>onDestroy() bingService For example, there are several methods to add to a service. If you want to call them in an activity, you need to get the ServiceConnection object in the activity, and use ServiceConnection to get the class object in the service. This class object is then used to call methods in the class, which of course inherits from the Binder object

 

3. The Activity startup process (don’t answer the lifecycle)

There are two ways to start an app. The first way is to click the corresponding application icon on the desktop launcher, and the second way is to start a new activity by calling startActivity in the activity.

When we create a new project, the default root activity is the MainActivity, and all activities are stored on the stack, so when we start a new activity, we put it on top of the previous activity, and when we click the application icon from the desktop, Since the launcher itself is an application, when you click on the icon, the system calls startActivitySately(). Typically, information about the activity you start is stored in the intent, such as action, category, and so on. When we install this application, the system will also start a management service of PackaManagerService. This management service will parse the androidmanifest. XML file to get relevant information in the application, such as service, activity, Broadcast, etc., and then get information about the relevant components. When we click on the application icon, the startActivitySately() method is called, Inside the method, startActivty() is called, and the startActivity() method eventually calls the startActivityForResult() method. The startActivityForResult() method. Since the startActivityForResult() method returns a result, the system simply gives a -1 to indicate that the result is not needed. The startActivityForResult() method actually starts the activity with the execStartActivity() method in the Instrumentation class, The Instrumentation class is mainly used to monitor the interaction between the program and the system. In the execStartActivity() method, you get a proxy object for ActivityManagerService from which to start the activity. The startup will call a checkStartActivityResult() method that will throw an exception if the component is not configured in the configuration manifest. Finally, of course, is to call Application. ScheduleLaunchActivity () to start the activity, and this method by getting a ActivityClientRecord object, The ActivityClientRecord uses a handler to send messages. Each activity component is described using an ActivityClientRecord object. The ActivityClientRecord object holds a LoaderApk object that starts the Activity component by calling the handleLaunchActivity, from which the page lifecycle methods are called.

 

 

4. Broadcast registration methods and differences

Extended here: When to use dynamic registration

 

Broadcast Broadcast. There are two registration modes.

The first is static registration, which can also be a resident broadcast, which needs to be registered in androidmanifest.xml, and the broadcast registered in this way is not affected by the page life cycle, even if you exit the page, you can receive the broadcast which is usually used when you want to boot up and so on, Since this registered broadcast is a resident broadcast, it consumes CPU resources.

 

The second one is dynamic registration, and dynamic registration, when you register in code, is also called non-resident broadcasting, because when you get a life cycle effect, when you exit the page, you don’t get a broadcast, and we usually use that for UI updates. This registration mode has a higher priority. Finally, you need to unbind it to avoid memory leakage

Broadcasting is divided into orderly broadcasting and disordered broadcasting.

HttpClient and HttpUrlConnection

6. Differences between Java virtual Machine and Dalvik Virtual Machine

7. Process survival (undead process)

8. Explain the Context

9. Understand the relationship between Activity, View and Window

10. Four LaunchModes and their usage scenarios

11. Drawing process of View

View, ViewGroup event distribution

13. Save the Activity state

14. Several animations in Android

15. Several ways to communicate across processes in Android

16. AIDL understands

17. Principle of Handler

18, Binder mechanism principle

19. Principle of thermal repair

20. Android memory leaks and management

21, Fragments communicate with fragments or activities

22. Android UI adaptation

23. App optimization

24. Image optimization

HybridApp WebView interacts with JS

JAVA GC principles

27. Causes and solutions of ANR

28. Design patterns

MVP, MVC, MVVM

RecyclerView and ListView difference

31, Universal-Imageloader, Picasso, Fresco, Glide contrast

Xutils, OKhttp, Volley, Retrofit

Those who only see themselves turning the screws, no matter how enthusiastic they are at the beginning, will get tired one day.

Those who turn the screws in order to build a rocket are able to find a breakthrough in the rigid and repetitive execution process and eventually get to the top of the pyramid.

The last

——————— wish you a bright future