Android Question [SOLVED] How To Add Camera Functionality

Big Dave

Member
Licensed User
Longtime User
Hi

I want to incorporate the ability to take simple pictures of pieces of paper within my app. The picture should be viewable on a panel both as a preview and the taken picture. I have been looking around the forum for the best way to do this and am now completely confused as to what to do and how to do it. I have added the Camera2 Library. Firstly do I need to add anything else and secondly are there any examples that can shed some light on how it is done. Thanks
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
No one can give you a solution based on the minimal information you provide. Anyway, you have a solution for the simple photos with Camera2 library. Then you simply have to display the photo collection in a convenient way for the user. What do you think of [XUI] CustomListView - lazy loading / virtualization? Because dozens of photos of papers without answers to the questions Who, What, Where, When and How, well that will soon become a hopeless and useless situation.

I hope that with the answers to the 5 W & H questions that you have some tools for your program design.
 
Upvote 0

Big Dave

Member
Licensed User
Longtime User
Thanks for your reply. The who is me, I am writing the app for my own use. The what is receipts and invoices as part of my expenses that I can claim back. Where and when is anywhere and anytime in terms of taking a photo and the how is what I am looking for answers. I have already written the code to do everything else but when I looked into the camera functionality it completely confused me, not surprising as I am newish to B4A. I am now going to look at the Camera2 and see what I can make of it. Watch this space.
 
Upvote 0

Big Dave

Member
Licensed User
Longtime User
Thanks for the pointer Erel. I am using CameraEx and have managed to preview in a panel and take a picture which is saved to a bitmap variable as I want to save it later to a database as a blob. Do I have to create a Jpeg file first or is there a way to write it directly to the blob field in the database.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…