Android Question Keep audio playing with pause activity

victormedranop

Well-Known Member
Licensed User
Longtime User
Hi, Is there any way to let the audio running when you exit the activity??

Thanks,

Victor
 

victormedranop

Well-Known Member
Licensed User
Longtime User
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

NJDude

Expert
Licensed User
Longtime User
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
Top