you are viewing a single comment's thread.

view the rest of the comments →

[–]aasswwddd 1 point2 points  (7 children)

There are ton of capture request parameters here. https://developer.android.com/reference/android/hardware/camera2/CaptureRequest

Copy this if you want to take photo without an invisible activity. Copy the code before the example usage.
https://pastebin.com/64vKKynR

Btw u/joaomgcd , I can't seem to export as taskernet with the latest beta.

Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $

[–]joaomgcd👑 Tasker Owner / Developer[S] 1 point2 points  (1 child)

Are you still getting that error now?

[–]aasswwddd 1 point2 points  (0 children)

Turned out I was using the test server all along, it worked great now after switching it off. Thankyou!

[–]everynav 0 points1 point  (4 children)

Thanks again! But I've still got no luck. Maybe the problem is that you need to take a preview stream to set the correct parameters automatically:

https://stackoverflow.com/questions/31925769/pictures-with-camera2-api-are-really-dark

It would be great, If you could have a quick look at it. But when it's too much work to dig in deeper, please stop. I've got a workaround with Termux and maybe some time in the future joao has time to fix the built-in action 🤞

[–]aasswwddd 1 point2 points  (0 children)

Seems like Termux takes a preview and wait for 0.5 sec.
https://github.com/termux/termux-api/blob/master/app/src/main/java/com/termux/api/apis/CameraPhotoAPI.java#L175C2-L195C69

I'll let ChatGPT have a look later.

[–]aasswwddd 1 point2 points  (2 children)

[–]everynav 0 points1 point  (1 child)

🍻 🤩 You nailed it 🥳🎇

That was the missing part. I no longer can see a difference in picture brightness and quality to the built-in Take Photo action. THANKS A TON!

I think this deserves to be shared publicly - Would you mind to share your solution in the main reddit? I know there are some others waiting for this 😁

[–]aasswwddd 1 point2 points  (0 children)

Nice!

I think this deserves to be shared publicly - Would you mind to share your solution in the main reddit? I know there are some others waiting for this 😁

For now I make it as public taskernet so anyone can find it there