Android devices are computing devices. As such, they have hardware for processing, memory, long-term storage, and to provide power. The Android OS provides objects to facilitate the monitoring of the status of this hardware. For example, the Android OS has a
BatteryManager that can be used to monitor the battery’s status, a
StorageManager that can be used to monitor the status of long-term storage, and a
PowerManager that can be used to monitor power consumption.
The objects used to monitor the internal environment of the device are instantiated as system services like the
SensorManager. Just like with
SensorManager, you do not instantiate these objects. To use them in an app, you get a reference to the appropriate system service.