Android Question how can i concatenate file name

Makumbi

Well-Known Member
Licensed User
how can i contenatenate filename this example that one with good.mp4. because i want to pass the file name as a string with its file extension so that it is played thanks in advance

B4X:
http://kccug.com/KabojjaApp/lessons/good.mp4
B4X:
Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then
        player1.Initialize("player")
        Dim sources As List
        sources.Initialize
        'sources.Add(player1.CreateUriSource("https://html5demos.com/assets/dizzy.mp4"))
        sources.Add(player1.CreateUriSource("http://kccug.com/KabojjaApp/lessons/good.mp4"))
        player1.Prepare(player1.CreateListSource(sources))
        
    End If
    Activity.LoadLayout("1")
    SimpleExoPlayerView1.Player = player1
    player1.Play
End Sub
 

Devv

Active Member
Licensed User
Longtime User
If you want to extract filename from url
Then I think you should use regex.split
With something like this regex
B4X:
/[^/]*$
 
Upvote 0
Top