Choose From Gallery or Take New Image

HimeAnator

Member
Licensed User
Longtime User
My app allows people to select an image from an image viewer. Has a pop up that says choose image and shows whatever gallery apps the user has installed but I would also like to allow the user to be able to take a new picture with their camera. I have seen apps that show the gallery apps but also have the option of selecting the camera to take a new image. Are their any tutorials on this? or Does anyone have any advice? I have tried searching the forum but was unsuccessful at finding what I was looking for. I did find out how to activate the camera and take pictures and save them etc. but I didn't see anything allowing me to add "Camera" or a "Take Picture" option to the chooser. The code below is that I use to bring the chooser up.
B4X:
chooser.Initialize("chooser")
chooser.Show("image/*", "Choose image")

Anyway to add camera to this?
Thank you for any help
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You will need to add this option in your app instead of the "intent resolver chooser". You can use CameraEx to handle the camera. There is also a library named EZCamera that allows you to use the default the camera app. While the second approach is simpler to implement the results vary between different devices and in many cases the quality is not good.
 
Upvote 0
Top