#Region Project Attributes
#ApplicationLabel: b4aQrDroidService
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\DemoRes
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Public TimerGetAnotherQRCode As Timer 'Turn this timer on the scan another QR Code
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.
Dim qrds As QrDroidService
Private Button1 As Button
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("main")
TimerGetAnotherQRCode.Initialize("TimerGetAnotherQRCode",1000)
TimerGetAnotherQRCode.Enabled=False
qrds.Initialize("qrds")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Log("Calling qrds.startQrDroidService")
qrds.startQrDroidService
' Log ("waiting for qrds.startQrDroidService...")
' wait for qrds.startQrDroidService_Ready
' Log("***************Out of qrds.startQrDroidService")
End Sub
Sub qrds_scan_result(result As String)
'Msgbox("In B4A and result = " & result,"")
Log("In B4A and result = " & result)
'Scan next QR Code
TimerGetAnotherQRCode.Enabled=True
End Sub
Sub TimerGetAnotherQRCode_Tick
TimerGetAnotherQRCode.Enabled=False
'qrds.startQrDroidService
Button1_Click
End Sub