Android Question Best way for me to implement the ability to take pictures/videos

MrKim

Well-Known Member
Licensed User
Longtime User
I need to implement the ability to take pics/vids in my app. I am not trying to reinvent the wheel - as simple as possible. These photos/videos are for technical documentation so quality/color are not critical, Compressed (jpg) is important- a must really as these will later be uploaded downloaded from a network drive.

It is important that this be seamless:
Click take a picture in my app
User takes the picture
I prompt for a filename/option to cancel (pictures will be saved on a network drive. If it is already a local file it will be deleted.).

I have tested Camera2 and it works OK but saves as BMP as default and a little research indicates that converting to compressed jpg is problematical? Also the interface is a little klutzy, seems like using the built in camera app would look better - but that part is not horribly critical.

Tried to test CameraIntent but I get the compile error "File type not supported: Macro", is this a lib issue or do I need a newer B4A? I am running 7.3 (I know it is time to upgrade). Besides in reading the replies there is evidently the issue on certain devices of it not using the supplied file name which means it would be impossible to open the picture in my app. How big an issue is this? We do spec the approved devices (tablets) but if it is going to be a real limitation this would be a problem.

Thanks in advance for any thoughts/ideas on the best way to go about this.
 

Semen Matusovskiy

Well-Known Member
Licensed User
CameraIntent (which uses built-in Camera app) is the easiest and most comfortable for users solution.
If to do own interface:
a) users will need to understand your own control buttons
b) it's hard to support all features , which has built-in Camera application.

I did not have problems with CameraIntent sample. But I tested at first time in B4A 7.80 or 8.00.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Tried to test CameraIntent but I get the compile error "File type not supported: Macro", is this a lib issue or do I need a newer B4A?
It doesn't use any library. It is related to the CreateResourceFromFile command in the manifest editor.

I have tested Camera2 and it works OK but saves as BMP as default and a little research indicates that converting to compressed jpg is problematical?
Not at all.

The intent based camera is a good solution.https://www.b4x.com/android/forum/threads/69215
However there are devices where the default camera app doesn't behave properly and you can't do anything about it.

Camera2 is more powerful than Camera however if you want to support older devices then you will get better results with Camera (CameraEx).
 
Upvote 0
Top