Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private ir As JavaObject
Private lgdisplaybtn As Button
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
ir.InitializeContext
ir = ir.RunMethod("getSystemService", Array("consumer_ir"))
If ir.IsInitialized = False Then
ToastMessageShow("IR Not Supported", True)
Return
End If
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub lgdisplaybtn_Click
Dim pattern() As Int = Array As Int( _
3142,9652,582,1466,554,472,556,444,580,442,582,1464,582,442, _
556,470,556,442,582,1464,584,1462,580,446,556,468,556,442, _
582,444,582,444,580,444,556,470,554,442,584,444,582,442, _
580,1466,554,472,556,1464,580,444,582,444,580,1464,556,1490, _
556,444,580)
ir.RunMethod("transmit", Array(38000, pattern))
End Sub