• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[TAsker] Camera Control: Zoom + Autofocus

ldm1417

Member
Hi there,

Is there a way to control the Camera Zoom + AutoFocus with Tasker? How?

Actually I need when the camera is launche, it will be launched with a zoom x4 and performs autofocus over the time (let's say each 1min).

Is this possible?

Thank you in advance!
 
Are zoom and autofocus controlled by tapping something in the app display?

You can use shell input x y to simulate a screen tap in Tasker.

You must be rooted.

If you run it on a device with a different screen size the x y coordinates will be different and it will not work.

There is probably a plugin (autoinput?) that will do it unrooted.

… Thom
 
"Are zoom and autofocus controlled by tapping something in the app display?" - yes. when the cam is in foreground and you tap the display the autofocus is performed to the touched pont. good catch! but how can I do this practically (I guess it should be performed with AutoInput plugin)?

"You can use shell input x y to simulate a screen tap in Tasker" - OK, I'll try ... I thought Ineed to use AutoInput plugin ....

"You must be rooted" - rooted :)

"If you run it on a device with a different screen size the x y coordinates will be different and it will not work" - how can I know the (X,Y) coordinates of the middle of the display?

"There is probably a plugin (autoinput?) that will do it unrooted" - how should I exactly do this?

As for the zoom, it's two fingers gesture... exectly like a "zoom in" gesture ... Could this gesture be performed with Tasker?

BTW, zoom function might be also performed with Volume Down and Volume Up buttons... Is there a way to simulate the buttons are been pressed?

Thank you!
 
I don't know of a way to do that with Tasker.

Perhaps there is a plug-in that supports it. I would think that is unlikely.

Perhaps there is another camera app you could use that controls it in a different way.

… Thom
 
X,Y values on my Moto Z Force …
Settings/Developer Options On
Input/Pointer Location On
X and Y are displayed at top of screen

go to screen you want to find out about
Position pointer
Write down X and Y coordinates

Return to Developer Options
Pointer Location Off

The location of the Developer Options varies from device to device … you have to search for it.

… Thom
 
Last edited:
"There's an app for that" - get screen coordinates:

As for the zooming, I'm needing to do that too. I configured camera to zoom with Volume Up/Down, but, sadly, it errors on that input
 

Attachments

  • Screenshot 2023-01-30 08.41.10.png
    Screenshot 2023-01-30 08.41.10.png
    42.7 KB · Views: 39
Back
Top Bottom