Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
package

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> manifest element.

Interfaces

Camera.AutoFocusCallback Callback interface used to notify on completion of camera auto focus. 
Camera.AutoFocusMoveCallback Callback interface used to notify on auto focus start and stop. 
Camera.ErrorCallback Callback interface for camera error notification. 
Camera.FaceDetectionListener Callback interface for face detected in the preview frame. 
Camera.OnZoomChangeListener Callback interface for zoom changes during a smooth zoom operation. 
Camera.PictureCallback Callback interface used to supply image data from a photo capture. 
Camera.PreviewCallback Callback interface used to deliver copies of preview frames as they are displayed. 
Camera.ShutterCallback Callback interface used to signal the moment of actual image capture. 
SensorEventListener Used for receiving notifications from the SensorManager when sensor values have changed. 
SensorEventListener2 Used for receiving a notification when a flush() has been successfully completed. 
SensorListener This interface was deprecated in API level 3. Use SensorEventListener instead.  

Classes

Camera The Camera class is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video. 
Camera.Area

The Area class is used for choosing specific metering and focus areas for the camera to use when calculating auto-exposure, auto-white balance, and auto-focus. 

Camera.CameraInfo Information about a camera  
Camera.Face Information about a face identified through camera face detection. 
Camera.Parameters Camera service settings. 
Camera.Size Image size (width and height dimensions). 
ConsumerIrManager Class that operates consumer infrared on the device. 
ConsumerIrManager.CarrierFrequencyRange Represents a range of carrier frequencies (inclusive) on which the infrared transmitter can transmit  
GeomagneticField Estimates magnetic field at a given point on Earth, and in particular, to compute the magnetic declination from true north. 
Sensor Class representing a sensor. 
SensorEvent This class represents a Sensor event and holds informations such as the sensor's type, the time-stamp, accuracy and of course the sensor's data
SensorManager

SensorManager lets you access the device's sensors

TriggerEvent This class represents a Trigger Event - the event associated with a Trigger Sensor. 
TriggerEventListener This class is the listener used to handle Trigger Sensors.