B4X:
			
		
		
		Private Sub SwitchTargetPlayerView(FullScreenIsDestination As Boolean)
    Dim mp As B4XMainPage = B4XPages.MainPage
    Dim jo As JavaObject
    Dim player As Object = mp.Player.As(JavaObject).GetField("player")
    jo.InitializeStatic("androidx.media3.ui.PlayerView")
    jo.RunMethod("switchTargetView", Array(player, IIf(FullScreenIsDestination, mp.SimpleExoPlayerView1, SimpleExoPlayerView1), IIf(FullScreenIsDestination, SimpleExoPlayerView1, mp.SimpleExoPlayerView1)))
End SubI have the media in B4XPage3 Class not B4XMainPage. Erel example is used with B4XMainPage only. Error is in First, Third and Fifth line code. How i set mp to B4XPage3 class?
 
				 
 
		 
 
		 
 
		 
 
		