Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# android.hardware

*** ** * ** ***

Provides support for hardware features, such as the camera and other sensors. Be aware that not all Android-powered devices support all hardware features, so you should declare hardware that your application requires using the [`<uses-feature>`](https://developer.android.com/guide/topics/manifest/uses-feature-element) manifest element.

## Interfaces

|---|---|
| [Camera.AutoFocusCallback](https://developer.android.com/reference/android/hardware/Camera.AutoFocusCallback) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.AutoFocusMoveCallback](https://developer.android.com/reference/android/hardware/Camera.AutoFocusMoveCallback) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.ErrorCallback](https://developer.android.com/reference/android/hardware/Camera.ErrorCallback) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.FaceDetectionListener](https://developer.android.com/reference/android/hardware/Camera.FaceDetectionListener) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.OnZoomChangeListener](https://developer.android.com/reference/android/hardware/Camera.OnZoomChangeListener) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.PictureCallback](https://developer.android.com/reference/android/hardware/Camera.PictureCallback) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.PreviewCallback](https://developer.android.com/reference/android/hardware/Camera.PreviewCallback) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.ShutterCallback](https://developer.android.com/reference/android/hardware/Camera.ShutterCallback) | *This interface was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [SensorEventListener](https://developer.android.com/reference/android/hardware/SensorEventListener) | Used for receiving notifications from the SensorManager when there is new sensor data. |
| [SensorEventListener2](https://developer.android.com/reference/android/hardware/SensorEventListener2) | Used for receiving a notification when a flush() has been successfully completed. |
| [SensorListener](https://developer.android.com/reference/android/hardware/SensorListener) | *This interface was deprecated in API level 3. Use `https://developer.android.com/reference/android/hardware/SensorEventListener` instead.* |

## Classes

|---|---|
| [BatteryState](https://developer.android.com/reference/android/hardware/BatteryState) | The BatteryState class is a representation of a single battery on a device. |
| [Camera](https://developer.android.com/reference/android/hardware/Camera) | *This class was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.Area](https://developer.android.com/reference/android/hardware/Camera.Area) | *This class was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.CameraInfo](https://developer.android.com/reference/android/hardware/Camera.CameraInfo) | *This class was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.Face](https://developer.android.com/reference/android/hardware/Camera.Face) | *This class was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.Parameters](https://developer.android.com/reference/android/hardware/Camera.Parameters) | *This class was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [Camera.Size](https://developer.android.com/reference/android/hardware/Camera.Size) | *This class was deprecated in API level 21. We recommend using the new `https://developer.android.com/reference/android/hardware/camera2/package-summary` API for new applications.* |
| [ConsumerIrManager](https://developer.android.com/reference/android/hardware/ConsumerIrManager) | Class that operates consumer infrared on the device. |
| [ConsumerIrManager.CarrierFrequencyRange](https://developer.android.com/reference/android/hardware/ConsumerIrManager.CarrierFrequencyRange) | Represents a range of carrier frequencies (inclusive) on which the infrared transmitter can transmit |
| [DataSpace](https://developer.android.com/reference/android/hardware/DataSpace) | DataSpace identifies three components of colors - standard (primaries), transfer and range. |
| [DisplayLuts](https://developer.android.com/reference/android/hardware/DisplayLuts) | DisplayLuts provides the developers to apply Lookup Tables (Luts) to a `https://developer.android.com/reference/android/view/SurfaceControl`. |
| [DisplayLuts.Entry](https://developer.android.com/reference/android/hardware/DisplayLuts.Entry) |   |
| [GeomagneticField](https://developer.android.com/reference/android/hardware/GeomagneticField) | Estimates magnetic field at a given point on Earth, and in particular, to compute the magnetic declination from true north. |
| [HardwareBuffer](https://developer.android.com/reference/android/hardware/HardwareBuffer) | HardwareBuffer wraps a native `AHardwareBuffer` object, which is a low-level object representing a memory buffer accessible by various hardware units. |
| [LutProperties](https://developer.android.com/reference/android/hardware/LutProperties) | Provides Lut properties of the device. |
| [OverlayProperties](https://developer.android.com/reference/android/hardware/OverlayProperties) | Provides supported overlay properties of the device. |
| [Sensor](https://developer.android.com/reference/android/hardware/Sensor) | Class representing a sensor. |
| [SensorAdditionalInfo](https://developer.android.com/reference/android/hardware/SensorAdditionalInfo) | This class represents a `https://developer.android.com/reference/android/hardware/Sensor` additional information frame, which is reported through listener callback `https://developer.android.com/reference/android/hardware/SensorEventCallback#onSensorAdditionalInfo(android.hardware.SensorAdditionalInfo)`. |
| [SensorDirectChannel](https://developer.android.com/reference/android/hardware/SensorDirectChannel) | Class representing a sensor direct channel. |
| [SensorEvent](https://developer.android.com/reference/android/hardware/SensorEvent) | This class represents a `https://developer.android.com/reference/android/hardware/Sensor` event and holds information such as the sensor's type, the time-stamp, accuracy and of course the sensor's `https://developer.android.com/reference/android/hardware/SensorEvent#values`. |
| [SensorEventCallback](https://developer.android.com/reference/android/hardware/SensorEventCallback) | Used for receiving sensor additional information frames. |
| [SensorManager](https://developer.android.com/reference/android/hardware/SensorManager) | SensorManager lets you access the device's `https://developer.android.com/reference/android/hardware/Sensor`. |
| [SensorManager.DynamicSensorCallback](https://developer.android.com/reference/android/hardware/SensorManager.DynamicSensorCallback) | Used for receiving notifications from the SensorManager when dynamic sensors are connected or disconnected. |
| [SensorPrivacyManager](https://developer.android.com/reference/android/hardware/SensorPrivacyManager) | This class provides information about the microphone and camera toggles. |
| [SensorPrivacyManager.Sensors](https://developer.android.com/reference/android/hardware/SensorPrivacyManager.Sensors) | Sensor constants which are used in `https://developer.android.com/reference/android/hardware/SensorPrivacyManager` |
| [SyncFence](https://developer.android.com/reference/android/hardware/SyncFence) | A SyncFence represents a synchronization primitive which signals when hardware units have completed work on a particular resource. |
| [TriggerEvent](https://developer.android.com/reference/android/hardware/TriggerEvent) | This class represents a Trigger Event - the event associated with a Trigger Sensor. |
| [TriggerEventListener](https://developer.android.com/reference/android/hardware/TriggerEventListener) | This class is the listener used to handle Trigger Sensors. |

-

  ## Interfaces

  - [Camera.AutoFocusCallback](https://developer.android.com/reference/android/hardware/Camera.AutoFocusCallback)
  - [Camera.AutoFocusMoveCallback](https://developer.android.com/reference/android/hardware/Camera.AutoFocusMoveCallback)
  - [Camera.ErrorCallback](https://developer.android.com/reference/android/hardware/Camera.ErrorCallback)
  - [Camera.FaceDetectionListener](https://developer.android.com/reference/android/hardware/Camera.FaceDetectionListener)
  - [Camera.OnZoomChangeListener](https://developer.android.com/reference/android/hardware/Camera.OnZoomChangeListener)
  - [Camera.PictureCallback](https://developer.android.com/reference/android/hardware/Camera.PictureCallback)
  - [Camera.PreviewCallback](https://developer.android.com/reference/android/hardware/Camera.PreviewCallback)
  - [Camera.ShutterCallback](https://developer.android.com/reference/android/hardware/Camera.ShutterCallback)
  - [SensorEventListener](https://developer.android.com/reference/android/hardware/SensorEventListener)
  - [SensorEventListener2](https://developer.android.com/reference/android/hardware/SensorEventListener2)
  - [SensorListener](https://developer.android.com/reference/android/hardware/SensorListener)
-

  ## Classes

  - [BatteryState](https://developer.android.com/reference/android/hardware/BatteryState)
  - [Camera](https://developer.android.com/reference/android/hardware/Camera)
  - [Camera.Area](https://developer.android.com/reference/android/hardware/Camera.Area)
  - [Camera.CameraInfo](https://developer.android.com/reference/android/hardware/Camera.CameraInfo)
  - [Camera.Face](https://developer.android.com/reference/android/hardware/Camera.Face)
  - [Camera.Parameters](https://developer.android.com/reference/android/hardware/Camera.Parameters)
  - [Camera.Size](https://developer.android.com/reference/android/hardware/Camera.Size)
  - [ConsumerIrManager](https://developer.android.com/reference/android/hardware/ConsumerIrManager)
  - [ConsumerIrManager.CarrierFrequencyRange](https://developer.android.com/reference/android/hardware/ConsumerIrManager.CarrierFrequencyRange)
  - [DataSpace](https://developer.android.com/reference/android/hardware/DataSpace)
  - [DisplayLuts](https://developer.android.com/reference/android/hardware/DisplayLuts)
  - [DisplayLuts.Entry](https://developer.android.com/reference/android/hardware/DisplayLuts.Entry)
  - [GeomagneticField](https://developer.android.com/reference/android/hardware/GeomagneticField)
  - [HardwareBuffer](https://developer.android.com/reference/android/hardware/HardwareBuffer)
  - [LutProperties](https://developer.android.com/reference/android/hardware/LutProperties)
  - [OverlayProperties](https://developer.android.com/reference/android/hardware/OverlayProperties)
  - [Sensor](https://developer.android.com/reference/android/hardware/Sensor)
  - [SensorAdditionalInfo](https://developer.android.com/reference/android/hardware/SensorAdditionalInfo)
  - [SensorDirectChannel](https://developer.android.com/reference/android/hardware/SensorDirectChannel)
  - [SensorEvent](https://developer.android.com/reference/android/hardware/SensorEvent)
  - [SensorEventCallback](https://developer.android.com/reference/android/hardware/SensorEventCallback)
  - [SensorManager](https://developer.android.com/reference/android/hardware/SensorManager)
  - [SensorManager.DynamicSensorCallback](https://developer.android.com/reference/android/hardware/SensorManager.DynamicSensorCallback)
  - [SensorPrivacyManager](https://developer.android.com/reference/android/hardware/SensorPrivacyManager)
  - [SensorPrivacyManager.Sensors](https://developer.android.com/reference/android/hardware/SensorPrivacyManager.Sensors)
  - [SyncFence](https://developer.android.com/reference/android/hardware/SyncFence)
  - [TriggerEvent](https://developer.android.com/reference/android/hardware/TriggerEvent)
  - [TriggerEventListener](https://developer.android.com/reference/android/hardware/TriggerEventListener)