GetSystemService for Android

Source: Internet
Author: User

GetSystemService is an important API for Android. It is a method of Activity. It retrieves the corresponding Object based on the input NAME and converts it to the corresponding service Object. The following describes the system services.

Input Name Returned object Description
WINDOW_SERVICE WindowManager Manage open window programs
LAYOUT_INFLATER_SERVICE LayoutInflater Get the view defined in xml
ACTIVITY_SERVICE ActivityManager Manage the system status of an application

POWER_SERVICE

PowerManger Power Supply Service
ALARM_SERVICE AlarmManager Alarm service

NOTIFICATION_SERVICE

Icationicationmanager Status Bar Service
KEYGUARD_SERVICE KeyguardManager Key lock Service
LOCATION_SERVICE LocationManager Location services, such as GPS
SEARCH_SERVICE SearchManager Search Service
VEBRATOR_SERVICE Vebrator Mobile phone vibration Service
CONNECTIVITY_SERVICE Connectivity Network Connection Service
WIFI_SERVICE WifiManager Wi-Fi Service
TELEPHONY_SERVICE TeleponyManager Telephone Service

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.