Android Question Chooser name files problem

Douglas Farias

Expert
Licensed User
Longtime User
B4X:
Dim cc as ContentChooser

Sub puxafoto
    cc.Initialize("cc")
    cc.Show("image/*", "Selecionar Imagem")
    End Sub

    Sub cc_Result (Success As Boolean, Dir As String, FileNames As String  )
    If Success Then
    mgsbox(FileNames, "test")
    End if
End sub


i make this code sample
to chooser image and it return me crazy image names
exemple

image%3A1444

casa%3A1444


and no .png and jpg files =(

how can i fix?
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
i want upload this image to my server
but in my php page receive only .jpg and png

when i choose a image from galery its go

image%3A1444

casa%3A1444

and not .jpg

%3A1444
 
Upvote 0

Shahid Saeed

Active Member
Licensed User
Longtime User
try this: fullpath is the path to your image file.

B4X:
Sub GetFileName(fullpath As String) As String
   Return fullpath.SubString(fullpath.LastIndexOf("/")+1)
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…