#Region Project Attributes
#ApplicationLabel: AndroidVisionMaster
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\resource
#AdditionalRes: C:\Users\----------2\Documents\Basic 4 Android\JOHAN APPS\JHS LIBS\resource\b4a_appcompat, de.amberhome.objects.appcompat
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\design\res, android.support.design
#ExcludeClasses: .games, .drive, .ads, .fitness, .wearable, .measurement, .cast, .auth, .nearby
#ExcludeClasses: .tagmanager, .analytics, .wallet, .plus, .gcm, .maps, .panorama
#Extends: android.support.v7.app.AppCompatActivity
#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 Button1 As Button
Private Label1 As Label
Private Label2 As Label
Private Label4 As Label
Private Label3 As Label
Dim settings(2) As Boolean
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")
Label1.Text = ""
Label2.Text = ""
Label3.Text = "Flash Disabled"
Label4.Text = "Auto Focus Enabled"
settings(0) = False
settings(1) = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
CallSubDelayed2(Main_Scanner, "StartScan", settings)
End Sub
Sub GetResult(retval() As String)
Log("back in main : format = " & retval(0))
Log("back in main : data = " & retval(1))
Label1.Text = "Barcode Format : " & retval(0)
Label2.Text = "Barcode Data : " & retval(1)
End Sub
Sub Label3_Click
If Label3.Text = "Flash Disabled" Then
Label3.Text = "Flash Enabled"
Label3.Color = Colors.Red
settings(0) = True
Else
Label3.Color = 0xff008000
Label3.Text = "Flash Disabled"
settings(0) = False
End If
End Sub
Sub Label4_Click
If Label4.Text = "Auto Focus Disabled" Then
Label4.Text = "Auto Focus Enabled"
Label4.Color = Colors.Red
settings(1) = True
Else
Label4.Color = 0xff008000
Label4.Text = "Auto Focus Disabled"
settings(1) = False
End If
End Sub