There are many service in the background of Android, they are systemserver open when the system starts, to support the normal operation of the system. The Getsystemservice method is used in the activity to invoke these service, which is an important API for activity. The corresponding object is obtained according to the name passed in, and then converted to the corresponding service object.
The name passed in |
The returned object |
Description |
Window_service |
WindowManager |
To manage open Windows programs |
Layout_inflater_service |
Layoutinflater |
Gets the view defined in the XML |
Activity_service |
Activitymanager |
Managing the system state of an application |
Power_service |
Powermanger |
Service of power supply |
Alarm_service |
Alarmmanager |
Services for the alarm clock |
Notification_service |
Notificationmanager |
Service for status bar |
Keyguard_service |
Keyguardmanager |
Service for keyboard lock |
Location_service |
Locationmanager |
Location of the service, such as GPS |
Search_service |
Searchmanager |
Search for services |
Vebrator_service |
Vebrator |
Mobile phone Shake Service |
Connectivity_service |
Connectivity |
Network-connected Services |
Wifi_service |
Wifimanager |
Wi-Fi Service |
Telephony_service |
Teleponymanager |
Telephone service |
Picture appreciation:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
System Services-----access to Activity Services Getsystemservice