Sub Process_Globals
Dim exoplay As SimpleExoPlayer
Dim connect As String = "http://streaming.shoutcast.com/LeafeCodesOnline?lang=en-US%2cen%3bq%3d0.9"
Dim tm As Timer
End Sub
Sub Globals
Private playView As SimpleExoPlayerView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("ui")
playView.Player = exoplay
exoplay.Initialize("exoplay")
exoplay.Prepare(exoplay.CreateUriSource(connect))
exoplay.Play
tm.Initialize ("tm",1000)
tm.Enabled = True
End Sub
Sub exoplay_Ready
Log("Player is ready")
End Sub
Sub exoplay_Error (Message As String)
Log("Error: " & Message)
End Sub
Sub exoplay_complete
Log("complete")
End Sub
Sub exoplay_TrackChanged
Log("Track Changed")
End Sub
Sub tm_Tick
Dim jo As JavaObject = exoplay
Dim state As Int = jo.RunMethod("getPlaybackState", Null)
' 1 = IDLE
' 2 = BUFFERING
' 3 = READY
' 4 = ENDED
Select state
Case 1
Log("IDLE")
Case 2
Log("BUFFERING")
Case 3
Log("READY")
Case 4
Log("ENDED")
End Select
End Sub