Android ActivityManager vs WindowManager
Asked Answered
T

2

12

Can someone please explain below in detail,

1- What is the use of ActivityManager & WindowManager?
2- What is the difference between ActivityManager & WindowManager?
Trow answered 11/2, 2012 at 5:29 Comment(0)
S
21

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

Scholasticism answered 11/2, 2012 at 6:8 Comment(2)
Actually the Activity Manager does more than manage activities. It was named that because in the very early implementations of Android all we had were activities (before we had even implemented multiple processes yet), but in the ultimate implementation the activity manager would probably be better called the "application manager" -- it decides when to start processes, and manages all of the top-level components (activities, receivers, services, content providers) running in them.Polynesia
@Polynesia Is there a way through Activity Manager to know when an Application Started and When the Application stopped (destroyed) ?Endamage
E
0

class ActivityManager Manage task, stack, when to show and hide Window content, destroy. System change aware, This class gives information about, and interacts with, activities, services, and the containing process.

ActvityManager belongs to android.app

Manage screens, it's state, position in stack and process


interface WindowManager extends ViewManager WindowManagerImpl Manage views and surfaces itself, patent view if exist, bound them to a particular app Display

WindowManager belongs to android.view

Manage views, it's x,y and z axis and animations

P.s. Topic in GoogleIO17

Ecphonesis answered 13/4, 2018 at 5:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.