Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
'Private qrcrv As QRCodeReaderView
Dim nativeMe As JavaObject
End Sub
Sub Globals
Private Button1 As Button
Private torchOn As Boolean = False
Private prevscan As String = ""
Private nqrcrv As NewQRCodeReaderView
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("1")
nativeMe.InitializeContext
nqrcrv.QRDecodingEnabled = True
nqrcrv.AutofocusInterval = 500
nqrcrv.ResultPointColor = Colors.Red
nqrcrv.Visible = True
nqrcrv.setBackCamera
nqrcrv.startCamera
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub nqrcrv_result_found(retval As String)
If prevscan = retval Then
prevscan = retval
Else
Log("b4aResult = " & retval)
prevscan = retval
nativeMe.RunMethod("playTone", Null)
End If
End Sub