Can someone please explain below in detail,
1- What is the use of ActivityManager & WindowManager?
2- What is the difference between ActivityManager & WindowManager?
android.app.ActivityManager. This class gives information about, and interacts with, activities, services, and the containing process. A number of the methods in this class are for debugging or informational purposes and they should not be used to affect any runtime behavior of your app.
The Android WindowManager is a system service, which is responsible for managing the z-ordered list of windows, which windows are visible, and how they are laid out on screen. Among other things, it automatically performs window transitions and animations when opening or closing an app or rotating the screen.
The ability to view running processes in Android is found in the Developer Options. In order to do that, open the Settings app and locate About Phone. In the About Phone section, locate Build Number (Figure A). The Build Number of your device lists the date your version of Android was built.
An activity represents a single screen with a user interface just like window or frame of Java. Android activity is the subclass of ContextThemeWrapper class. The Activity class defines the following call backs i.e. events. You don't need to implement all the callbacks methods.
Window Manager :- It is responsible for organizing the screen. It allocates surface and decide where they(Applications) go and how they are layered. At create surface for all the applications and they draw directly into the surface without going through the Window Manager.
Activity Manager:- Using the Activity Manager, the Android System manages a stack of activities which are in different states (starting, running, paused, stopped, destroyed).
Some basic things regarding activitys, windows and surfaces.
-An activity has one or more windows (e.g. dialogs)
-A window has one or more surfaces (e.g. surface views)
-However, in window manager, a window is called a session
-A surface is called a window
-And an activity becomes roughly a token
for getting information regarding Applications key concepts, activities and resources check this link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With