#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.
'https://www.b4x.com/android/forum/threads/abzxing-barcode-reader.7303/#content
Private myABBarcode As ABZxing 'muss man erst kaufen dann kann man ein Zip runter laden, die Lib nutzt die App aus dem Play Store ..
Private ButtonScan As Button
Private EditTextBC As EditText
Private LabelFormat As Label
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("Scan")
EditTextBC.Text="..."
LabelFormat.Text = "..."
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ButtonScan_Click
EditTextBC.Text = "..."
LabelFormat.Text = "..."
myABBarcode.ABGetBarcode("myABBarcode", "")
End Sub
Sub myABBarcode_BarcodeFound(barCode As String, formatName As String)
Main.ScannedBarcode = barCode
EditTextBC.Text = barCode
LabelFormat.Text = formatName
End Sub
Sub myABBarcode_Canceled
Main.ScannedBarcode = ""
EditTextBC.Text = "Canceled"
EditTextBC.Enabled=True
LabelFormat.Text = ""
End Sub
Sub EditTextBC_EnterPressed
Main.ScannedBarcode = EditTextBC.Text.Trim
LabelFormat.Text = "OK"
End Sub