any other simple method than this. i have a activity based app, not b4x pages. this example is adding too many libraries.
Edit - camera2 lib seems to be working. it is recommended to use it. i just want to capture a image.
MediaChooser depends on: FileProvider, Phone, B4XPages, Audio
The other libraries such as SMM and ExoPlayer are not needed unless you want to show the media.
Camera2 is a lower level solution. For simple cases, it is usually better to use an intent based solution. You can take the CaptureImage code from MediaChooser.
thanks, i will try CaptureImage code from MediaChooser. i removed ExoPlayer and it gave me a error, i will try again and keep only code i need for capturing image.
i opened a new non-b4x page project (bcoz my app is old), added MediaChooser and other Libs like you suggested. and in giving me error.
Log:
Unknown type: b4xmainpage Are you missing a library reference? (B4XPages.B4XPages)
When Running:
B4A Version: 14.00
Parsing code. Error
Error parsing program.
Error description: Unknown type: b4xmainpage
Are you missing a library reference?
Error occurred on line: 74 (B4XPages)
Public Sub MainPage As B4XMainPage
I wasn't clear. MediaChooser does depend on B4XPages. You can try to extract the source code (it is a zip file) and take out the feature that you need.
i extracted the class file from Library, added to new project and i am able to get camera window, but after taking a pic, it is showig false in "Result.Success" i am uploading project. please see