Does Pixel 5a support CameraX vendor extension?

468 views
Skip to first unread message
Assigned to scot...@google.com by eri...@google.com

Mohammad Sajib Al Seraj

unread,
Oct 11, 2021, 12:57:33 PM10/11/21
to Android CameraX Discussion Group

Hello,

I am developing a camera app which need to set following features for Pixel 5a phone.

1.                   Night Sight mode

2.                   Zoom

3.                   Exposure

4.                   Shadows

 I am facing following challenges.

1.       I have implemented night sight mode using camera extension api. But I am facing problem with accessing vendor extension. Does   Pixel 5a support CameraX vendor extension? If not, then how can I set night sight mode for Pixel 5a?

2.       Can I set exposure and shadows using CameraX api?

Thanks

Charcoal Chen

unread,
Oct 11, 2021, 11:52:44 PM10/11/21
to Mohammad Sajib Al Seraj, Android CameraX Discussion Group
Hi,

Thanks for raising the questions.

1. CameraX vendor extension is not enabled on Pixel 5a yet (not enabled on all Pixel series devices yet). After it is enabled in the future, 3P apps can access the extension effects via CameraX (camera-extensions) or CameraExtensionCharacteristics. Except for these two approaches, there should be no other approach to access Pixel series devices' special effects.
2. Please try CameraControl#setExposureCompensationIndex(int) to adjust the exposure setting which is supported by Camera2 standard API. About the brightness/shadows adjustment feature of Google Camera App, it is its private feature and different from the Camera2 standard exposure adjustment. There should be no public API to access it.

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/24f874db-6a96-4dbd-96ae-e6ccb69e80b0n%40android.com.

Mohammad Sajib Al Seraj

unread,
Oct 12, 2021, 9:48:12 AM10/12/21
to Charcoal Chen, Android CameraX Discussion Group
Thank you Chen for the clarification. 
Is there any way to install extension manually and then access Pixel series devices' special effects?

Thanks
Mohammad

Charcoal Chen

unread,
Oct 12, 2021, 9:40:20 PM10/12/21
to Mohammad Sajib Al Seraj, Android CameraX Discussion Group
Unfortunately, it can't be supported by installing manually. The OEMs' vendor extension implementations might need to add some private HAL or system level implementation. It generally needs an OTA to update the full ROM to support extension.

Mohammad Sajib Al Seraj

unread,
Nov 3, 2021, 11:07:42 AM11/3/21
to Charcoal Chen, Android CameraX Discussion Group
" Camera2 provides an API for accessing effects—bokeh, HDR, and others—that have been implemented by phone manufacturers for specific phones.What are the Camera2 extensions API supported devices? Is the list the same as the CameraX supported device list? Thanks Mohammad

Eric Ng

unread,
Nov 3, 2021, 12:32:39 PM11/3/21
to Mohammad Sajib Al Seraj, Charcoal Chen, Android CameraX Discussion Group
Hi Mohammad,

What are the Camera2 extensions API supported devices? Is the list the same as the CameraX supported device list? 

Yes for both questions, however Camera2 requires Android 12 as well as support for the same CameraX Extensions. Additionally you can check if a device supports this (Camera2 Extensions) with a device property: ro.camerax.extensions.enabled

Thanks



--
-Eric Ng

Mohammad Sajib Al Seraj

unread,
Nov 17, 2021, 11:04:55 AM11/17/21
to Eric Ng, Charcoal Chen, Android CameraX Discussion Group
Hello,
I have bought one listed extension supported device Motorola g7 play. But still I am finding extensions not available, I cannot enable extensions for this device.
if (hdrImageCaptureExtender.isExtensionAvailable(cameraSelector)) {
// Enable the extension if available.
hdrImageCaptureExtender.enableExtension(cameraSelector);
}
Any suggestions?

Thanks 
Mohammad

Eric Ng

unread,
Nov 17, 2021, 11:26:29 AM11/17/21
to Mohammad Sajib Al Seraj, Charcoal Chen, Android CameraX Discussion Group
Hi Mohammad,

Are you seeing an error or anything you can share why this is not behaving as expected?
--
-Eric Ng

Mohammad Sajib Al Seraj

unread,
Nov 17, 2021, 2:27:57 PM11/17/21
to Eric Ng, Charcoal Chen, Android CameraX Discussion Group
From the log analysis I only found "ExtenderVersion: No versioning extender found. Falling back to default".

Thanks
Mohammad

Mohammad Sajib Al Seraj

unread,
Nov 17, 2021, 3:30:50 PM11/17/21
to Eric Ng, Charcoal Chen, Android CameraX Discussion Group
I have also tried with new extension API (androidx.camera:camera-extensions:1.0.0-alpha30)

 

Still I am facing issue. Here is the log 

2020-09-20 01:29:27.107 17031-17031/com.example.jetpackcamerax D/ExtensionApplication: Providing custom CameraXConfig through Application

2020-09-20 01:29:27.112 17031-17031/com.example.jetpackcamerax D/ExtensionApplication: Providing custom CameraXConfig through Application

2020-09-20 01:29:27.396 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Rejecting re-init on previously-failed class java.lang.Class<androidx.camera.extensions.ExtensionsManager$1>: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/extensions/impl/InitializerImpl$OnExtensionsInitializedCallback;

2020-09-20 01:29:27.396 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.396 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.396 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.396 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.camera.extensions.impl.InitializerImpl$OnExtensionsInitializedCallback" on path: DexPathList[[zip file "/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/lib/arm, /data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk!/lib/armeabi-v7a, /system/lib]]

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Rejecting re-init on previously-failed class java.lang.Class<androidx.camera.extensions.ExtensionsManager$1>: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/extensions/impl/InitializerImpl$OnExtensionsInitializedCallback;

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.camera.extensions.impl.InitializerImpl$OnExtensionsInitializedCallback" on path: DexPathList[[zip file "/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/lib/arm, /data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk!/lib/armeabi-v7a, /system/lib]]

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.397 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.399 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Rejecting re-init on previously-failed class java.lang.Class<androidx.camera.extensions.ExtensionsManager$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/extensions/impl/InitializerImpl$OnExtensionsDeinitializedCallback;

2020-09-20 01:29:27.399 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.399 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.399 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.399 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.camera.extensions.impl.InitializerImpl$OnExtensionsDeinitializedCallback" on path: DexPathList[[zip file "/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/lib/arm, /data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk!/lib/armeabi-v7a, /system/lib]]

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Rejecting re-init on previously-failed class java.lang.Class<androidx.camera.extensions.ExtensionsManager$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/camera/extensions/impl/InitializerImpl$OnExtensionsDeinitializedCallback;

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.camera.extensions.impl.InitializerImpl$OnExtensionsDeinitializedCallback" on path: DexPathList[[zip file "/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/lib/arm, /data/app/com.example.jetpackcamerax-J-_OHWiurhvpVvw5DGcvzQ==/base.apk!/lib/armeabi-v7a, /system/lib]]

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at com.google.common.util.concurrent.ListenableFuture androidx.camera.extensions.ExtensionsManager.getInstance(android.content.Context) (ExtensionsManager.java:132)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity.setupCamera() (CameraExtensionsActivity.java:317)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(androidx.camera.lifecycle.ProcessCameraProvider) (CameraExtensionsActivity.java:290)

2020-09-20 01:29:27.400 17031-17031/com.example.jetpackcamerax I/.jetpackcamera:     at void com.example.jetpackcamerax.CameraExtensionsActivity$2$1.onSuccess(java.lang.Object) (CameraExtensionsActivity.java:286)

Charcoal Chen

unread,
Nov 17, 2021, 10:54:25 PM11/17/21
to Mohammad Sajib Al Seraj, Eric Ng, Android CameraX Discussion Group
Hi,

I do not have a Motorola g7 play device. I tried to reproduce the issue on a Motorola one hyper device, but I didn't encounter the issue no matter if I use 1.0.0-alpha30 or the extensions sample app in the latest code base. Could you check the following items to help clarify the issue?


1. I'm not sure whether the issue is caused by the proguard setting. A proguard related issue b/201177844 was ever reported, but your callstack looks not proguarded and the error is not AbstractMethodError. If you have proguard settings on your app, could you disable the proguard to check whether the issue is related to it? If the issue is related to proguard, maybe you need to include the camera-extensions's proguard rule setting (link), or please let us know what's your proguard setting which current camera-extensions's proguard rule setting can't work well with.

2. Could you check whether the device's ROM can be updated? Sometimes, the device needs to update to the latest release ROM to support CameraX Extensions.


Please also help to provide us the following device info:


1. Device Android version

2. Device model name

3. ROM build number


Mohammad Sajib Al Seraj

unread,
Nov 18, 2021, 10:37:42 AM11/18/21
to Charcoal Chen, Eric Ng, Android CameraX Discussion Group
Hello,
Here is the details: 
1.       Currently I am using proguard only for release version, provided log for debug version. Here is the code snippet
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

2.      My device is update to date.

Device info:

1. Device Android version: 9

2. Device model name: moto g7 play

3. ROM build number: PCYS29.105-247-5

Thanks
Mohamamd

Eric Ng

unread,
Nov 18, 2021, 11:22:49 AM11/18/21
to Mohammad Sajib Al Seraj, Charcoal Chen, Android CameraX Discussion Group
Hi Mohammad,

Thank you for the information. However on the CameraX supported devices page, there is a caveat  here: "Some extensions listed may be subject to specific API levels or SKUs from the manufacturer. To see if a particular device supports extensions, use the CameraXBasic code sample on GitHub"

For CameraX extensions most devices will require a minimum of Android 10 or API level 29 for CameraX extensions to function.

Thanks,
-Eric

Mohammad Sajib Al Seraj

unread,
Nov 18, 2021, 11:57:47 AM11/18/21
to Eric Ng, Charcoal Chen, Android CameraX Discussion Group
Thank you so much for the clarification. 

Thanks
Mohamamd

Mohammad Sajib Al Seraj

unread,
Nov 23, 2021, 12:23:51 AM11/23/21
to Eric Ng, Charcoal Chen, Android CameraX Discussion Group
I checked with Motorola G Power and Smasung S10+. For both of the devices CameraX extension version 1.0.0-alpha30 is working.  We are planning to integrate night mode support for our next release version software, maybe mid next year. Now I have one concern. Is it a good idea to use the alpha version of CameraX extension for software release?

Thanks
Mohammad

Charcoal Chen

unread,
Nov 23, 2021, 12:43:50 AM11/23/21
to Mohammad Sajib Al Seraj, Eric Ng, Android CameraX Discussion Group
Thanks for the question.

We're doing the Extensions API review and plan to enter the beta stage ASAP. Since your release plan is in the mid next year, your app could be built with Extensions API beta release version at least.

Mohammad Sajib Al Seraj

unread,
Nov 23, 2021, 1:11:38 PM11/23/21
to Charcoal Chen, Eric Ng, Android CameraX Discussion Group
Thank you.

Sent from my iPhone

On Nov 23, 2021, at 12:43 AM, Charcoal Chen <charco...@google.com> wrote:



Mohammad Sajib Al Seraj

unread,
Dec 27, 2021, 12:33:20 PM12/27/21
to Charcoal Chen, Eric Ng, Android CameraX Discussion Group

I found two methods ExtensionsManager#getInstanceAsync(Context, CameraProvider) ExtensionsManager#getInstance(Context) for getting ExtensionsManager instances.

I am getting extension availability using ExtensionsManager#getInstance(Context) method, but not getting extension availability using ExtensionsManager#getInstanceAsync(Context, CameraProvider) method. Developer guide asks to use ExtensionsManager#getInstanceAsync(Context, CameraProvider) method.Which one should I use?

When I applied ExtensionMode.NIGHT or other extension mode for image capturing I am getting a lot of noise (green dots and image quality is bad). Any idea why it’s happening?

Thanks
Mohammad

Charcoal Chen

unread,
Dec 27, 2021, 9:01:13 PM12/27/21
to Android CameraX Discussion Group, Mohammad Sajib Al Seraj, Eric Ng, Android CameraX Discussion Group, Charcoal Chen
Hi,

There are some Extensions API related changes in the latest 1.0.0-alpha32 release due to we worked to lockdown the API surface to prepare entering the beta stage. Please refer to the release note of 1.0.0-alpha32:

  • Renamed ExtensionsManager#getInstance API as getInstanceAsync because it returns ListenableFuture. The Async suffix of the function name can clearly present that it is an async function.
  • Remove resolution parameter from the ExtensionsManager#getEstimatedCaptureLatencyRange API since users can't know which sizes are supported for the ImageCapture use case and can't distinguish whether the returned latency information is for the maximum capture output size or the input resolution parameter.
  • Move CameraProvider parameter of ExtensionsManager functions to the getInstance() API. So that the users don't need to input the CameraProvider parameter each time when calling the ExtensionsManager functions.

There should be only ExtensionsManager#getInstanceAsync(Context, CameraProvider) API but no ExtensionsManager#getInstanceAsync(Context) API in the latest release. Please turn to use the latest ExtensionsManager#getInstanceAsync(Context, CameraProvider) which should no longer change after entering beta stage.

About the NIGHT mode related problem, could you help to create an issue here on the Buganizer system and provide more detailed information to clarify?
  • The device information that you encountered the problem (model name, model number, Android version)
  • Can the problem be seen in the preview? Please provide a screenshot of the preview.
  • Please provide the captured image which is corresponding to the previous preview screenshot.
  • Can you please check whether the issue also exist in the device's native camera app?

Thanks.

Mohammad Sajib Al Seraj

unread,
Dec 28, 2021, 9:11:27 AM12/28/21
to Charcoal Chen, Android CameraX Discussion Group, Eric Ng
Thank you Chen for the clarification.
I will create an issue about the night mode thing. 

Thanks
Mohammad
Reply all
Reply to author
Forward
0 new messages