Android Question Open directly audio stream with VLC [SOLVED]

Claudio Parmigiani

Member
Licensed User
Longtime User
Hi all,
I'd like to open VLC from my APP, and play automatically the TCP AUDIO stream coming from a specified URI (i.e. http://example.com:8888).

Right now I only found out how to launch VLC, but after that I have to open the Network Stream manually.

Is there a way to pass the Network Stream URI to VLC APP and start playing?
Even better: could the VLC player go directly in background ?

Actual code: (copied/modified from some other thread here...)

B4X:
Sub LaunchVLC_Click
    Try
    Dim Intent1 As Intent
    Dim pm As PackageManager
    Intent1 = pm.GetApplicationIntent ("org.videolan.vlc.betav7neon")
    StartActivity (Intent1)
    Catch
    ToastMessageShow ("Failed to launch app!  Is it installed?", True)
  End Try

End Sub

I've tried with some intent.PutExtra with no results.
Thank you for the help & keep up the good work!

Best Regards,
Claudio Parmigiani
 

NJDude

Expert
Licensed User
Longtime User
Try this code:
B4X:
Private i As Intent

i.Initialize(i.ACTION_VIEW, "<URL_TO_MEDIA>")
i.SetComponent("org.videolan.vlc.betav7neon/org.videolan.vlc.betav7neon.gui.video.VideoPlayerActivity")

StartActivity(i)
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Try this code:
B4X:
Private i As Intent

i.Initialize(i.ACTION_VIEW, "<URL_TO_MEDIA>")
i.SetComponent("org.videolan.vlc.betav7neon/org.videolan.vlc.betav7neon.gui.video.VideoPlayerActivity")

StartActivity(i)

Hello, i try your code but i have this error:
....

unable to find explicit activity class {org.videolan.vlc.betav7neon/org.videolan.vlc.betav7neon.gui.video.VideoPlayerActivity};
have you declared this actiity in your AndroidManifet.xml?
continue?



can you help me? thanks!!!
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top