ExtensionsManager
class ExtensionsManager
kotlin.Any | |
↳ | androidx.camera.extensions.ExtensionsManager |
Provides interfaces for third party app developers to get capabilities info of extension functions.
Summary
Nested classes |
|
---|---|
The effect mode options applied on the bound use cases |
|
Public methods |
|
---|---|
static ListenableFuture<ExtensionsManager.ExtensionsAvailability!> |
init() Initialize the extensions asynchronously. |
static Boolean |
isExtensionAvailable(effectMode: ExtensionsManager.EffectMode!, lensFacing: Int) Indicates whether the camera device with the |
static Boolean |
isExtensionAvailable(klass: Class<*>!, effectMode: ExtensionsManager.EffectMode!, lensFacing: Int) Indicates whether the camera device with the |
static Unit |
setExtensionsErrorListener(@Nullable listener: ExtensionsErrorListener?) Sets an |
Public methods
init
@NonNull static fun init(): ListenableFuture<ExtensionsManager.ExtensionsAvailability!>
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.
isExtensionAvailable
static fun isExtensionAvailable(effectMode: ExtensionsManager.EffectMode!, lensFacing: Int): Boolean
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 |
ExtensionsManager.EffectMode!: The LensFacing of the camera device to be checked. |
Return | |
---|---|
Boolean: True if the specific extension function is supported for the camera device. |
isExtensionAvailable
static fun isExtensionAvailable(klass: Class<*>!, effectMode: ExtensionsManager.EffectMode!, lensFacing: Int): Boolean
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 |
Class<*>!: The extension function to be checked. |
lensFacing |
Class<*>!: The LensFacing of the camera device to be checked. |
Return | |
---|---|
Boolean: True if the specific extension function is supported for the camera device. |
setExtensionsErrorListener
static fun setExtensionsErrorListener(@Nullable listener: ExtensionsErrorListener?): Unit
Sets an ExtensionsErrorListener
which will get called any time an extensions error is encountered.
Parameters | |
---|---|
listener |
ExtensionsErrorListener?: The ExtensionsErrorListener listener that will be run. |