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(Context context)
Initialize the extensions asynchronously. |
static
boolean
|
isExtensionAvailable(Class<?> klass, ExtensionsManager.EffectMode effectMode, int lensFacing)
Indicates whether the camera device with the lensFacing can support the specific extension function for specific use case. |
static
boolean
|
isExtensionAvailable(ExtensionsManager.EffectMode effectMode, int lensFacing)
Indicates whether the camera device with the lensFacing can support the specific extension function. |
static
void
|
setExtensionsErrorListener(ExtensionsErrorListener listener)
Sets an |
Inherited methods | |
---|---|
Public methods
init
public static ListenableFuture<ExtensionsManager.ExtensionsAvailability> init (Context context)
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.
Parameters | |
---|---|
context |
Context |
Returns | |
---|---|
ListenableFuture<ExtensionsManager.ExtensionsAvailability> |
isExtensionAvailable
public static boolean isExtensionAvailable (Class<?> klass, ExtensionsManager.EffectMode effectMode, int lensFacing)
Indicates whether the camera device with the 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 |
int : The 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 (ExtensionsManager.EffectMode effectMode, int lensFacing)
Indicates whether the camera device with the lensFacing can support the specific extension function.
Parameters | |
---|---|
effectMode |
ExtensionsManager.EffectMode : The extension function to be checked. |
lensFacing |
int : The 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.
Last updated 2020-09-30 UTC.