victormedranop Well-Known Member Licensed User Longtime User Aug 5, 2016 #1 Hi, Is there any way to let the audio running when you exit the activity?? Thanks, Victor
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2016 #2 Yes, play it from a service. Call Service.StartForeground to prevent Android from killing it. Upvote 0
victormedranop Well-Known Member Licensed User Longtime User Aug 14, 2016 #3 I was trying with calling the service with this B4X: Sub Service_Start (StartingIntent As Intent) Dim vv As VideoView vv.Initialize("vv") vv.LoadVideo("http","http://66.128.53.117:9950" ) vv.Play End Sub but no audio Upvote 0
I was trying with calling the service with this B4X: Sub Service_Start (StartingIntent As Intent) Dim vv As VideoView vv.Initialize("vv") vv.LoadVideo("http","http://66.128.53.117:9950" ) vv.Play End Sub but no audio
NJDude Expert Licensed User Longtime User Aug 14, 2016 #4 You should be using MediaPlayerStream not VideoView to play audio. This will work: B4X: Private music As MediaPlayerStream music.Initialize("Music") music.Load("http://66.128.53.117:9950") ... Sub Music_StreamReady music.Play End Sub You need to reference the AUDIO library in the IDE. Upvote 0
You should be using MediaPlayerStream not VideoView to play audio. This will work: B4X: Private music As MediaPlayerStream music.Initialize("Music") music.Load("http://66.128.53.117:9950") ... Sub Music_StreamReady music.Play End Sub You need to reference the AUDIO library in the IDE.