# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# HardwarePropertiesManager

`public class HardwarePropertiesManager`
`extends Object` ``

java.lang.Object
↳ | android.os.HardwarePropertiesManager

The HardwarePropertiesManager class provides a mechanism of accessing hardware state of a device: CPU, GPU and battery temperatures, CPU usage per core, fan speed, etc.

## Summary

### Constants
`int` | `DEVICE_TEMPERATURE_BATTERY` Temperature of battery in Celsius.
`int` | `DEVICE_TEMPERATURE_CPU` Temperature of CPUs in Celsius.
`int` | `DEVICE_TEMPERATURE_GPU` Temperature of GPUs in Celsius.
`int` | `DEVICE_TEMPERATURE_SKIN` Temperature of device skin in Celsius.
`int` | `TEMPERATURE_CURRENT` Get current temperature.
`int` | `TEMPERATURE_SHUTDOWN` Get shutdown temperature threshold.
`int` | `TEMPERATURE_THROTTLING` Get throttling temperature threshold.
`int` | `TEMPERATURE_THROTTLING_BELOW_VR_MIN` Get throttling temperature threshold above which minimum clockrates for VR mode will not be met.
`float` | `UNDEFINED_TEMPERATURE` Undefined temperature constant.

### Public methods
`CpuUsageInfo[]` | `getCpuUsages()` Return an array of CPU usage info for each core.
`float[]` | `getDeviceTemperatures(int type, int source)` Return an array of device temperatures in Celsius.
`float[]` | `getFanSpeeds()` Return an array of fan speeds in RPM.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### DEVICE_TEMPERATURE_BATTERY

    public static final int DEVICE_TEMPERATURE_BATTERY

Temperature of battery in Celsius.

Constant Value: 2 (0x00000002)

### DEVICE_TEMPERATURE_CPU

    public static final int DEVICE_TEMPERATURE_CPU

Temperature of CPUs in Celsius.

Constant Value: 0 (0x00000000)

### DEVICE_TEMPERATURE_GPU

    public static final int DEVICE_TEMPERATURE_GPU

Temperature of GPUs in Celsius.

Constant Value: 1 (0x00000001)

### DEVICE_TEMPERATURE_SKIN

    public static final int DEVICE_TEMPERATURE_SKIN

Temperature of device skin in Celsius.

Constant Value: 3 (0x00000003)

### TEMPERATURE_CURRENT

    public static final int TEMPERATURE_CURRENT

Get current temperature.

Constant Value: 0 (0x00000000)

### TEMPERATURE_SHUTDOWN

    public static final int TEMPERATURE_SHUTDOWN

Get shutdown temperature threshold.

Constant Value: 2 (0x00000002)

### TEMPERATURE_THROTTLING

    public static final int TEMPERATURE_THROTTLING

Get throttling temperature threshold.

Constant Value: 1 (0x00000001)

### TEMPERATURE_THROTTLING_BELOW_VR_MIN

    public static final int TEMPERATURE_THROTTLING_BELOW_VR_MIN

Get throttling temperature threshold above which minimum clockrates for VR mode will not be met.

Constant Value: 3 (0x00000003)

### UNDEFINED_TEMPERATURE

    public static final float UNDEFINED_TEMPERATURE

Undefined temperature constant.

Constant Value: -3.4028235E38

## Public methods

### getCpuUsages

    public CpuUsageInfo[] getCpuUsages ()

Return an array of CPU usage info for each core.

Returns
`CpuUsageInfo[]` | an array of `CpuUsageInfo` for each core. Return `null` for each unplugged core. Empty if CPU usage is not supported on this system.

Throws
`SecurityException` | if something other than the device owner or the current VR service tries to retrieve information provided by this service.

### getDeviceTemperatures

    public float[] getDeviceTemperatures (int type,
                    int source)

Return an array of device temperatures in Celsius.

Parameters
`type` | `int`: type of requested device temperature, one of `DEVICE_TEMPERATURE_CPU`, `DEVICE_TEMPERATURE_GPU`, `DEVICE_TEMPERATURE_BATTERY` or `DEVICE_TEMPERATURE_SKIN`. Value is `DEVICE_TEMPERATURE_CPU`, `DEVICE_TEMPERATURE_GPU`, `DEVICE_TEMPERATURE_BATTERY`, or `DEVICE_TEMPERATURE_SKIN`
`source` | `int`: source of requested device temperature, one of `TEMPERATURE_CURRENT`, `TEMPERATURE_THROTTLING`, `TEMPERATURE_THROTTLING_BELOW_VR_MIN` or `TEMPERATURE_SHUTDOWN`. Value is `TEMPERATURE_CURRENT`, `TEMPERATURE_THROTTLING`, `TEMPERATURE_SHUTDOWN`, or `TEMPERATURE_THROTTLING_BELOW_VR_MIN`

Returns
`float[]` | an array of requested float device temperatures. Temperature equals to `UNDEFINED_TEMPERATURE` if undefined. Empty if platform doesn't provide the queried temperature. This value cannot be `null`.

Throws
`SecurityException` | if something other than the device owner or the current VR service tries to retrieve information provided by this service.

### getFanSpeeds

    public float[] getFanSpeeds ()

Return an array of fan speeds in RPM.

Returns
`float[]` | an array of float fan speeds in RPM. Empty if there are no fans or fan speed is not supported on this system. This value cannot be `null`.

Throws
`SecurityException` | if something other than the device owner or the current VR service tries to retrieve information provided by this service.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*