Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private ion As Object
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
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("Layout1")
End
Sub ion_Event (MethodName As String, Args() As Object) As Object
'Args(0) = resultCode
'Args(1) = intent
Return Null
End Sub
Sub StartActivityForResult(i As Intent)
Dim jo As JavaObject = GetBA
ion = jo.CreateEvent("com.xmtvplayer.watch.live.streams","org.zeipel.videoplayer.XMTVPlayer", Null)
jo.RunMethod("startActivityForResult", Array As Object(ion, 100))
End Sub
Sub GetBA As Object
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetField("processBA")
End Sub
Sub XMTVPlayerPlayUri(Title As String, Uri As String)
Dim returnIntent As Intent
returnIntent.PutExtra("path",Uri)
returnIntent.PutExtra("name",Title)
returnIntent.PutExtra("HideBufferLine","True")
StartActivityForResult(returnIntent) 'Or StartService(returnIntent)
End Sub