Ok first off I know how to stop the stream ...
mp.Stop gets it done except under this circumstance
First let me show you the code and then what the problem is
Sub tbScan_CheckedChange(Checked As Boolean)
If Checked = True Then
mp.Initialize("mp")
mp.Load("http://relay.radioreference.com:80/264858664")
Activity.Title = "Loading Media"
Else
mp.Stop
End If
End Sub
Above Code gets it done ... starts the stream and if I need to stop it I just hit the Toggle Button again and it stops it
So whats the problem then right?
Well it starts with the next code
Sub btnLiveCalls_Click
RemoveViews
Activity.LoadLayout("NewLayout")
Download
End Sub
When I load the new layout it goes just fine newlayout works great
Also .... the Stream is still playing and I want it to
but when I hit the next block of code to return to original layout called (imgLayout)
This is where the problem is
Sub btnReturn_Click
RemoveViews
Activity.LoadLayout("imgLayout")
If db.Exist(db.FilePath_ & db.FileName_) Then
db.ResetPointers
db.GetRecord
Else
' do nothing
End If
End Sub
When I return the Main layout is restored thMediaStream is still playing as I wish it to
BUT ....... The Toggle Button is restored too but is in off position
so when I click on it it doesnt stop the MediaStream it starts a new one
or does nothing
but doesnt stop it
SO what I think I need is .... in tbScan_CheckedChange event I think what I need to do is rewrite that code so that that it checks to see if a stream is playing maybe?
If MediaStream Exist then
mp.stop
Or something what do I do guys?