CameraInfo
public
interface
CameraInfo
| androidx.camera.core.CameraInfo |
An interface for retrieving camera information.
Applications can retrieve an instance via CameraX.getCameraInfo(CameraX.LensFacing).
Summary
Public methods | |
|---|---|
abstract
int
|
getSensorRotationDegrees()
Returns the sensor rotation, in degrees, relative to the device's "natural" rotation. |
abstract
int
|
getSensorRotationDegrees(int relativeRotation)
Returns the sensor rotation, in degrees, relative to the given rotation value. |
abstract
LiveData<Boolean>
|
isFlashAvailable()
Returns if flash unit is available or not. |
Public methods
getSensorRotationDegrees
public abstract int getSensorRotationDegrees ()
Returns the sensor rotation, in degrees, relative to the device's "natural" rotation.
| Returns | |
|---|---|
int |
The sensor orientation in degrees. |
See also:
getSensorRotationDegrees
public abstract int getSensorRotationDegrees (int relativeRotation)
Returns the sensor rotation, in degrees, relative to the given rotation value.
Valid values for the relative rotation are Surface.ROTATION_0, Surface.ROTATION_90, Surface.ROTATION_180, Surface.ROTATION_270.
| Parameters | |
|---|---|
relativeRotation |
int: The rotation relative to which the output will be calculated. |
| Returns | |
|---|---|
int |
The sensor orientation in degrees. |