Android self-learning core Services

Source: Internet
Author: User

The core services of the so-called Android include entropy Services (Entropy service), Power Manager, Activity Manager (Activity Manager), call Register (Telephony Registry), the Package Manager, the account manager, the Content manager, the Content Manager, the contents provider (System content Providers), Battery Services (Battery service), Light Services (Lights service), Vibration services (vibrator service), Alarm Manager (Alarm Manager), watchdog (Init Watchdog), Window manager, Bluetooth service, and so on. These services are closely related to applications, but typically applications cannot directly access core services. Earlier versions of hardware services (Hardware service) and sensor services (sensors service) have been removed, and light services and vibration services are initiated through the system server in the core service. The implementation of the system server is located in Systemserver.java.

1. Entropy Service
Entropy service is mainly responsible for loading and maintaining the entropy pool data of the Linux kernel at the switch machine. The additional entropy pool data includes: Serial number (serial no), boot mode, baseband (base band), Carrier (carrier), boot loader (bootloader), hardware (hardware), version (revision), The current time (subtlety), the current timestamp (nanosecond), and the implementation of the entropy service are located in the Entropyservice.java file.
In the application layer, the entropy pool data can be obtained through the build object, as follows:
Build. Model//Product name
Build. Manufacturer//Equipment Manufacturers
Android.os.Build.VERSION.SDK//SDK version such as "9"
For more information, refer to Build.java and Deviceinfosettings.java.


2. Power Manager
The Power Manager is responsible for the system's power management policies, such as keyboard lights, LCD backlight, buttons, etc., the relevant implementation is located in the Powermanagerservice.java file. Specific strategies are divided into Screen_off, Screen_dim, Screen_bright, Screen_button_bright, All_bright, Lights_mask and other levels.


3. Activity Manager
Stack-based management of the application lifecycle, allowing users to switch between different activity. The Activity Manager implementation is located in the Activitymanagerservice.java file. After you start the Activity manager, you should also install the system content provider for it, add a watchdog, and so on. Providers.


4. Call Register
Manage calls-related content. The implementation of the call register is located in the Telephonyregistry.java file.


5. Package Manager
To manage the installation package, you can perform actions such as installing, uninstalling, activating, living, viewing the permissions of the package, and so on. The usage of the Package Manager is PM [List|path|install|uninstall].
The script executed is:/SYSTEM/BIN/PM. The script reads as follows:
Base=/system
Export Classpath= $base/framework/pm.jar
EXEC app_process $base/bin com.android.commands.pm.Pm "[Email protected]"
The implementation of the Package Manager is located in the Packagemanagerservice.java file.


6. Account Manager
The so-called Account Manager manages the account name, password, authentication, etc. of the application account on the device, and the Account Manager implementation is located in the Accountmanagerservice.java file.


7. Content Organizer
The content organizer accesses and shares data primarily among applications. For example, other applications can access the contact information in the phone book. The implementation of the content organizer is located in the Contentservice.java file.


8. Battery Service
Battery service is mainly responsible for the management of battery charge status, battery power level and so on. The relevant implementation is located in the Batteryservice.java file.


9. Light Service
The so-called light services mainly include LCD backlight, button backlight, keyboard lights and so on. The relevant implementation is located in the Lightsservice.java file.


10. Vibration Services
The so-called vibration service is the control of the motor, the relevant implementation is located in the Vibratorservice.java file.


11. Alarm Manager
The alarm manager is responsible for the alarm wake-up, cancellation, and alarm list management, and related implementations are located in the Alarmmanagerservice.java file.


12. Window Manager
Manage Windows systems. The implementation of the window manager is located in the Windowmanagerservice.java file. This is the most important part of the Android UI framework. Window types include activity, Dialog, Popupwindow, and so on. The actual control is carried out through the windowtoken.


13. Bluetooth service
Android provides support for the Bluetooth protocol, and the associated upper-layer code is implemented in the Android.bluetooth package, with the main classes including Android.bluetooth. Bluetoothadapter, Android.bluetooth. Bluetoothdevice, Android.
Bluetooth. Bluetoothsocket, Android.bluetooth. Bluetoothserversocket, Android.bluetooth. Bluetoothclass and so on. It provides convenience for scanning, connecting Bluetooth devices, and file transfer based on Bluetooth device. The upper-level code for Bluetooth is primarily located in the Frameworks\base\core\java\android\bluetooth directory. Currently Android support Bluetooth standard BT 2.1, the use of Bluetooth protocol stack for the famous open source Bluetooth protocol stack BlueZ. If it is running on the emulator, the Bluetooth service does not start.


In addition to the core services, Android also provides users with device policy Management services, a status bar service, the Clipboard service (Clipboard Services), Input method (Inputmethod service), Network status Services (NETSTAT service), Network Management Services (networkmanagement service), Connection services (Connectivity Service), throttle services, Access Manager (Accessibility Manager), Mount Services (Mount service), Notification Manager (Notification manager), Mount Services (Mount service), storage monitor (device Storage Monitor), Location manager, search manager, Dropbox service (Dropbox Wallpaper service), audio service, headphone viewer (Headset Observer), Dock Viewer (Dock Observer), USB viewer (USB) Observer), UI mode management Service (UI Mode Manager service), backup service, Appwidget services (appwidget service), Identification Service (recognition Service), Diskstats Services (diskstats), and more. (Excerpt from Miaozhongliang-"Android multimedia programming from beginner to proficient")

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.