How to zoom Camera using CameraX?

1,087 views
Skip to first unread message

Pinkal Patel

unread,
May 10, 2019, 5:45:42 AM5/10/19
to Android CameraX Discussion Group
How can we zoom camera using Android CameraX API?. I have tried to implement by myself but not get any result. For reference please check my question on StackOverflow: https://stackoverflow.com/questions/56057310/how-to-zoom-camera-using-android-camerax-api

Jawad Ahmed

unread,
May 13, 2019, 4:42:04 PM5/13/19
to Android CameraX Discussion Group
Have you got any solution yet?

Oscar Wahltinez‎

unread,
May 13, 2019, 8:17:54 PM5/13/19
to Android CameraX Discussion Group
Pinkal, I just replied to your question on StackOverflow. Feel free to reach out here if you run into any other issues (or open other questions on StackOverflow if more appropriate).

Pinkal Patel

unread,
May 14, 2019, 1:46:13 AM5/14/19
to Android CameraX Discussion Group
@Oscar, I have just commented in your answer to my question on StackOverflow. I need an answer How to zoom camera using CameraX? I have also open issue in Github Please look into it: https://github.com/android/camera/issues/3

Pinkal Patel

unread,
May 14, 2019, 1:46:56 AM5/14/19
to Android CameraX Discussion Group
No, Still finding the solution. 

Vinit Modi

unread,
May 15, 2019, 4:39:02 PM5/15/19
to Pinkal Patel, Android CameraX Discussion Group
Hi Pinkal,

One of our other team members, Scott, has also added a reply on StackOverflow. Please let us know if there are more questions. Thanks!

Vinit

--
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/f3de41d2-cc15-4173-bc45-05d1c3e9356d%40android.com.

Pinkal Patel

unread,
May 16, 2019, 1:54:15 AM5/16/19
to Android CameraX Discussion Group, pinkal....@gmail.com
Hi Vinit,

I have already read an answer from Scott. I have tried the same as he told in the first sentence but didn't work and I don't see any camera zoom. But still, I will try with camera2 in the same demo.

It will be great if you can implement a zoom in your GitHub sample demo. So we can easily understand how its work with CameraX.

Thanks,
Pinkal


On Thursday, May 16, 2019 at 2:09:02 AM UTC+5:30, Vinit Modi wrote:
Hi Pinkal,

One of our other team members, Scott, has also added a reply on StackOverflow. Please let us know if there are more questions. Thanks!

Vinit

From: Pinkal Patel <pinkal....@gmail.com>
Date: Mon, May 13, 2019 at 10:46 PM
To: Android CameraX Discussion Group

No, Still finding the solution. 

On Tuesday, May 14, 2019 at 2:12:04 AM UTC+5:30, Jawad Ahmed wrote:
Have you got any solution yet?

On Friday, May 10, 2019 at 2:45:42 PM UTC+5, Pinkal Patel wrote:
How can we zoom camera using Android CameraX API?. I have tried to implement by myself but not get any result. For reference please check my question on StackOverflow: https://stackoverflow.com/questions/56057310/how-to-zoom-camera-using-android-camerax-api

--
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-developers+unsub...@android.com.

Hinderer, Darren

unread,
May 16, 2019, 11:32:50 AM5/16/19
to Pinkal Patel, Android CameraX Discussion Group

Using the new CameraView lib is probably the easiest way to get pinch to zoom working using Camera X vs using the preview directly.

 

You can see how the CameraView libray does the lower level zoom logic here:

https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/camera/view/src/main/java/androidx/camera/view/CameraView.java#1137

https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/camera/view/src/main/java/androidx/camera/view/CameraXModule.java#473

 

 

From: <camerax-d...@android.com> on behalf of Pinkal Patel <pinkal....@gmail.com>
Date: Wednesday, May 15, 2019 at 10:54 PM
To: Android CameraX Discussion Group <camerax-d...@android.com>
Cc: "pinkal....@gmail.com" <pinkal....@gmail.com>
Subject: Re: [camerax-developers] Re: How to zoom Camera using CameraX?

 

Hi Vinit,

 

I have already read an answer from Scott. I have tried the same as he told in the first sentence but didn't work and I don't see any camera zoom. But still, I will try with camera2 in the same demo.

It will be great if you can implement a zoom in your GitHub sample demo. So we can easily understand how its work with CameraX.

 

Thanks,

Pinkal

On Thursday, May 16, 2019 at 2:09:02 AM UTC+5:30, Vinit Modi wrote:

Hi Pinkal,

 

One of our other team members, Scott, has also added a reply on StackOverflow. Please let us know if there are more questions. Thanks!

 

Vinit

 

From: Pinkal Patel <pinkal....@gmail.com>
Date: Mon, May 13, 2019 at 10:46 PM
To: Android CameraX Discussion Group

No, Still finding the solution. 

On Tuesday, May 14, 2019 at 2:12:04 AM UTC+5:30, Jawad Ahmed wrote:

Have you got any solution yet?


On Friday, May 10, 2019 at 2:45:42 PM UTC+5, Pinkal Patel wrote:

How can we zoom camera using Android CameraX API?. I have tried to implement by myself but not get any result. For reference please check my question on StackOverflow: https://stackoverflow.com/questions/56057310/how-to-zoom-camera-using-android-camerax-api

--
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.

--

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/591a4eb9-2fdc-4d3b-a215-33413b142717%40android.com.

Pinkal Patel

unread,
May 17, 2019, 5:11:45 AM5/17/19
to Android CameraX Discussion Group, pinkal....@gmail.com
Thank you @Vinit. I will look into it.

To unsubscribe from this group and stop receiving emails from it, send an email to camerax-developers+unsub...@android.com.

--
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-developers+unsub...@android.com.

Reply all
Reply to author
Forward
0 new messages