Jun 02, 2021 Article blog
Baidu Android development programmers two rounds of interview the first part of the answer to the question:
MVP pattern benefits:
MVP mode drawbacks:
Because views are rendered in Presenter, views and Presenters interact too often. I t's also important to understand that if Presenter renders views too much, it tends to make them too closely related to a particular view. Once the view needs to change, presenter needs to change as well
First define
a service,
then connect inside the onCreate of
the activityy
and bindservice or directly startService.
An Activity is usually a separate screen, and each Activity is implemented as a separate class that is inherited from the Activity base class, which displays the user interface made up of view controls and responds to events in view controls.
Android Service is code that runs in the background, cannot interact with users, can run in its own processes, or it can run in the context of other application processes. Need to be used by one Activity or other Context object.
Activity jumps to Activity, Activity starts service, and Service opens Activity. Both Intent needs to indicate the intent of the jump, as well as the transmission parameters, and Intent is the carrier of the signal transmission between these components.