I am using the following code to display an image from the Gallery:
All is OK and the image displays no problem.
However, the image file name is displayed as:
content://com.android.providers.media.documents/document/image%3A4307
and not its actual file name.
B4X:
Sub imgChooser_Result (Success As Boolean, Dir As String, FileName As String)
Dim MyWidth As Int
Dim MyHeight As Int
MyWidth = imgPhoto.Width
MyHeight = imgPhoto.height
ImageName = FileName
If Success Then
imgPhoto.Bitmap = LoadBitmapSample(Dir, FileName, MyWidth, MyHeight)
imgPhoto.Gravity = Gravity.FILL
pnlViewer.Visible = True
btnMainReturn.Visible = False
ToastMessageShow("Image selected" & FileName, True)
Else
ToastMessageShow("No image selected", True)
End If
lblDetailsImageText.text = ImageName
End Sub
However, the image file name is displayed as:
content://com.android.providers.media.documents/document/image%3A4307
and not its actual file name.