Android.Hardware Namespace
Provides support for hardware features, such as the camera and other sensors.
Remarks
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.
Classes
| Type | Reason |
|---|---|
| AccuracyChangedEventArgs | |
| Axis | Enumerates values returned by several methods of Axis and taken as a parameter of the SensorManager.RemapCoordinateSystem, and SensorManager.RemapCoordinateSystem members. |
| 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 | |
| CameraInfo | Information about a camera |
| Face | Information about a face identified through camera face detection. |
| FaceDetectionEventArgs | Provides data for the Camera.FaceDetection event. |
| IAutoFocusCallback | Callback interface used to notify on completion of camera auto focus. |
| IAutoFocusMoveCallback | Callback interface used to notify on auto focus start and stop. |
| IErrorCallback | Callback interface for camera error notification. |
| IFaceDetectionListener | Callback interface for face detected in the preview frame. |
| IOnZoomChangeListener | Callback interface for zoom changes during a smooth zoom operation. |
| IPictureCallback | Callback interface used to supply image data from a photo capture. |
| IPreviewCallback | Callback interface used to deliver copies of preview frames as they are displayed. |
| IShutterCallback | Callback interface used to signal the moment of actual image capture. |
| Parameters | Camera service settings. |
| Size | Image size (width and height dimensions). |
| ZoomChangeEventArgs | Provides data for the Camera.ZoomChange event. |
| CameraError | Enumerates values returned by the CameraError.ServerDied, and CameraError.Unknown members and taken as a parameter of the Camera+IErrorCallback.OnError member. |
| CameraFacing | Enumerates values returned by several types. |
| ConsumerIrManager | Class that operates consumer infrared on the device. |
| CarrierFrequencyRange | |
| FocusDistance | Enumerates values returned by several types. |
| GeomagneticField | Estimates magnetic field at a given point on Earth, and in particular, to compute the magnetic declination from true north. |
| ISensorEventListener | Used for receiving notifications from the SensorManager when sensor values have changed. |
| ISensorEventListener2 | Used for receiving a notification when a flush() has been successfully completed. |
| ISensorListener | Used for receiving notifications from the SensorManager when sensor values have changed. |
| Preview | Enumerates values returned by several types. |
| ReportingMode | Enumerates values returned by several types. |
| Sensor | Class representing a sensor. |
| SensorChangedEventArgs | |
| SensorDelay | Enumerates values returned by several methods of SensorDelay and taken as a parameter of several types. |
| 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 SensorEvent.Values. |
| SensorListenerAccuracyChangedEventArgs | |
| SensorListenerSensorChangedEventArgs | |
| SensorManager |
java Example public class SensorActivity extends Activity, implements SensorEventListener {
private final SensorManager mSensorManager;
private final Sensor mAccelerometer;
public SensorActivity() {
mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
}
protected void onResume() {
super.onResume();
mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
}
protected void onPause() {
super.onPause();
mSensorManager.unregisterListener(this);
}
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
public void onSensorChanged(SensorEvent event) {
}
} |
| SensorStatus | Enumerates values returned by several types and taken as a parameter of several types. |
| SensorType | Enumerates values returned by several types and taken as a parameter of several types. |
| 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. |

