ExtensionsManager
public
final
class
ExtensionsManager
extends Object
| java.lang.Object | |
| ↳ | androidx.camera.extensions.ExtensionsManager |
Provides interfaces for third party app developers to get capabilities info of extension functions.
Summary
Nested classes | |
|---|---|
enum |
ExtensionsManager.EffectMode
The effect mode options applied on the bound use cases |
enum |
ExtensionsManager.ExtensionsAvailability
|
Public methods | |
|---|---|
static
ListenableFuture<ExtensionsManager.ExtensionsAvailability>
|
init()
Initialize the extensions asynchronously. |
static
boolean
|
isExtensionAvailable(ExtensionsManager.EffectMode effectMode, CameraX.LensFacing lensFacing)
Indicates whether the camera device with the |
static
boolean
|
isExtensionAvailable(Class<?> klass, ExtensionsManager.EffectMode effectMode, CameraX.LensFacing lensFacing)
Indicates whether the camera device with the |
static
void
|
setExtensionsErrorListener(ExtensionsErrorListener listener)
Sets an |
Inherited methods | |
|---|---|
Public methods
init
public static ListenableFuture<ExtensionsManager.ExtensionsAvailability> init ()
Initialize the extensions asynchronously.
This should be the first call to the extensions module. An application must wait until the
ListenableFuture completes before making any other calls to the extensions module.
| Returns | |
|---|---|
ListenableFuture<ExtensionsManager.ExtensionsAvailability> |
|
isExtensionAvailable
public static boolean isExtensionAvailable (ExtensionsManager.EffectMode effectMode, CameraX.LensFacing lensFacing)
Indicates whether the camera device with the CameraX.LensFacing can support the specific
extension function.
| Parameters | |
|---|---|
effectMode |
ExtensionsManager.EffectMode: The extension function to be checked. |
lensFacing |
CameraX.LensFacing: The CameraX.LensFacing of the camera device to be checked. |
| Returns | |
|---|---|
boolean |
True if the specific extension function is supported for the camera device. |
isExtensionAvailable
public static boolean isExtensionAvailable (Class<?> klass,
ExtensionsManager.EffectMode effectMode,
CameraX.LensFacing lensFacing)
Indicates whether the camera device with the CameraX.LensFacing can support the specific
extension function for specific use case.
| Parameters | |
|---|---|
klass |
Class: The ImageCapture or Preview class to be checked. |
effectMode |
ExtensionsManager.EffectMode: The extension function to be checked. |
lensFacing |
CameraX.LensFacing: The CameraX.LensFacing of the camera device to be checked. |
| Returns | |
|---|---|
boolean |
True if the specific extension function is supported for the camera device. |
setExtensionsErrorListener
public static void setExtensionsErrorListener (ExtensionsErrorListener listener)
Sets an ExtensionsErrorListener which will get called any time an
extensions error is encountered.
| Parameters | |
|---|---|
listener |
ExtensionsErrorListener: The ExtensionsErrorListener listener that will be run.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.