AMS (Activity Manager Service)
Why AMS?
It performs date process and memory management of activities, services, content providers and broadcast receivers.
AMS RESPONSIBILITIES
- Manages and Schedules the activity life cycle of all applications.
- Start or Kill the process of the application.
- Start or Schedule the service life .
- Register BroadcastReceiver, and receive and distribute Broadcast.
- Start and publish ContentProvider.
- Scheduling tasks.
- Crash handling of Applications.
- Query the current operationg status of the android.
AMS Data Structure
Activity Record
AMS users mainly do data structures to handle these folders.
Activity record
and Tasks
Activity record is the base data structure, which records the characterisitcs of Single Activity.
Tasks is basically a collection of multiple activity records.
ActivityRecord.java
Tasks
Task has a one domain relationship with activity records. Task has many properties related to the management of multiple activity records and the task stack itself
Task.java
ProcessRecord
ProcessRecord.java
- Get Status about System Services
- Extract Diagnostic information about services like AMS, WMS, PMS, bluetoot etc.
- Debugging System Services
DUMPSYS command
> adb shell dumpsys -l
- it will show you all the services which are currently running in the emulator.
> adb shell dumpsys
- if you want to know the latest of the current state of all the system services