Android Question Taking photos 2020

udg

Expert
Licensed User
Longtime User
Hi all,
as a follow up on this thread, I'd like to understand which is the preferred way to take a photo nowadays.
Would you still use the Camera Intent or switch to CameraEx (or Camera2 depending on Android version)?
I used the former in an old project of mine and I'm aware that I've to update it in order to use FileProvider, but, eventually, interacting directly with the camera is nowadays the preferred method?

BTW, I will have to search on how to take photos on iOS too (but let's have a functioning Android app first).

To better focus on my specific goal: I expect pictures taken out of paper documents being A5, A4 or even larger in size. That means good resolution but non so many colors (I hope..ehehe).

Once a "good" photo is taken, I'll use techniques from the linked thread to keep the file size to a minimum and upload it to a remote server.

udg
 

Alexander Stolte

Expert
Licensed User
Longtime User
camera2 is the best choice and as erel said in this thread, the minimum sdk is sufficient 2020.

But I personally still use cameraEx in my apps because it just works.
I have some mods on the class:
To get the best preview size

And i use the "PreviewImageToJpeg" Function to make a image from the camera, because the quality of the image is better.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
here are some pictures i took, where i tested the quality, the file size is the same i uploaded to the server, you see ~200kb or less.
The pictures were taken with the CameraEx class together with the 2 mods I explained above. I reduced the file size of the pictures as described here:
1076.jpg1079.jpg1080.jpg1081.jpg1075.jpg
The pictures were created on my Oneplus 6.
 
  • Like
Reactions: udg
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi Alexander, thank you for your constant support.
When my app will be ready I should consider that it will be 50% yours..:)

Now I'm gonna pause it for a short time since I'm signaled that the stuff I ordered to use with B4R it's just arrived.. I feel like a baby ready to unpack his new toys!

?
 
Upvote 0
Top