Android Question Native Camera Intent


Active Member
Licensed User
Longtime User
Hi guys,

Glad to be back with the B4X Brotherhood :cool:

How you guys been?

This used to work 3 years ago but not now - can take picture but cannot save

Image Capture:
Dim i As Intent
i.Initialize("", "")
i.PutExtra("output", ParseUri("file://" & File.Combine(File.DirInternal, PictureName)))
Sub ParseUri(FileName As String) As Object
    Dim r As Reflector
    Return r.RunStaticMethod("", "parse", Array As Object(FileName), Array As String("java.lang.String"))
End Sub

App crashes unless I comment i.PutExtra

Has command methodology or Manifest changed?

Thank you very much


Licensed User
Longtime User
In File.DirInternal ("file://" & File.Combine(File.DirInternal, PictureName)
You can try
To see where it is.

As a general rule:
- Store private files in File.DirInternal and public files in File.DirDefaultExternal or if you want to support runtime permissions then use RuntimePermissions.GetSafeDirDefaultExternal (SEE THE TUTORIAL).

If you want to show it in the gallery:
Upvote 0


Active Member
Licensed User
Longtime User
Been away too long. Tough to get back in the swing of things

If anyone can solve this - then donation of USD 10 through Paypal - as a small token of my appreciation

Things have changed in two years - so what worked back then, ain't workin' now

Just need:

1. Open Native Camera
2. Take Picture - with manual click
3. SAVE PICTURE - in a Folder called "Demo"

Can do? Mighty obliged guys, if possible

Back online in a couple of hours
Upvote 0


Well-Known Member
Licensed User
Longtime User
Attached sample does the job on the root directory, Just add the folder you need (ensure it exists or create it before saving)
Best regards!
File is too large to be attached.
You can download it from
Upvote 0