thanks, now I use exoplayer in service and create eventlistener.
it works well in debug mode, but log show "Unexpected event (missing RaiseSynchronousEvents): check_event"
I try add #RaisesSynchronousEvents: check_event
and test app in release mode, not work!
player1 must run in service because I want to play in background
please suggest me.
Sub create_event
Dim jo As JavaObject = player1
jo = jo.GetField("player")
Dim e As Object = jo.CreateEvent("com.google.android.exoplayer2.ExoPlayer.EventListener", "check", False)
jo.RunMethod("addListener", Array As Object(e))
End Sub
Sub check_event (MethodName As String, Args() As Object) As Object
Log(MethodName)
If(MethodName = "onPlayerStateChanged") Then Player_onPlayerStateChanged(Args(0), Args(1))
If(MethodName = "onLoadingChanged") Then Player_onLoadingChanged(Args(0))
If(MethodName = "onTimelineChanged") Then Player_onTimelineChanged(Args(0), Args(1))
If(MethodName = "onPositionDiscontinuity") Then Player_onPositionDiscontinuity
Return True
End Sub