#Region Project Attributes
#ApplicationLabel: ZxingBarcodeScanner
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#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.
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.
Private zx1 As ZxingBarcodeScanner
Private b1 As Button
Private b2 As Button
Private b3 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")
zx1.LaserColor = Colors.Yellow
zx1.MaskColor = Colors.ARGB(150, 0, 0, 200)
zx1.BorderColor = Colors.Magenta
zx1.BorderStrokeWidth = 5
zx1.BorderLineLength = 40
zx1.Visible = False
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
zx1.Visible = False
zx1.stopScanner
End Sub
Sub b1_Click
zx1.toggleFlash
End Sub
Sub b2_Click
zx1.Visible = True
zx1.startScanner
End Sub
Sub b3_Click
zx1.Visible = False
zx1.stopScanner
End Sub
Sub zx1_scan_result (scantext As String, scanformat As String)
Log ("B4A scan text = " & scantext)
Log ("B4A scan format = " & scanformat)
End Sub