Hello All, i have this code on an activity, but the sound doesn't play when the activity is started.
but if i put the
inside a Sub Button1_click then it plays when i click the button, i'm confused why won't the sound play as soon as the activity starts?
Any thoughts?
Thanks
Walter
B4X:
Activity.LoadLayout("Green1")
sp.Initialize(1)
sound = sp.Load(File.DirAssets, "ding.mp3")
sp.Play(sound, 1, 1, 1, 0, 1)
but if i put the
sp.play(sound, 1, 1, 1, 0, 1)
inside a Sub Button1_click then it plays when i click the button, i'm confused why won't the sound play as soon as the activity starts?
Any thoughts?
Thanks
Walter