If the device has a front and back camera then the ID = 0 If the ID is -1 after initialization then the device does not support a front facing camera If the device has a front camera only then the ID's will be BACK = -1 and FRONT = 0 after initialization If the device has a back camera only then the ID's will be BACK = 0 and FRONT = -1 after initialization If the device has front and back cameras then the ID's will be BACK = 0 and FRONT = 1 after initialization If the ID is -1 after initialization then the device does not support a back facing camera You must disable the READ ONLY property of this xml file, do the changes, save the xml file, and then set the property back to READ ONLY.Īuthor: Github: Nishant Srivastava, Wrapped by: Johan Schoeman If you want to change the size (width / height) of the scanner then do so by editing activity_main.xml in the /Object/res/layout folder of the B4A project. Sub myscanner_scan_result(result As String) Sub Activity_Pause (UserClosed As Boolean) Myscanner.InitialScannerText = "Scan a 1D or 2D Barcode" 'Do not forget to load the layout file created with the visual designer. Sub Activity_Create(FirstTime As Boolean) 'These variables can only be accessed from this module. 'These global variables will be redeclared each time the activity is created. 'These variables can be accessed from all modules. 'These global variables will be declared once when the application starts. #AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\google\google_play_services\libproject\google-play-services_lib\res, #AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, 7.appcompat #AdditionalRes: C:\Users\-2\Documents\Basic 4 Android\JOHAN APPS\JHS LIBS\resource\b4a_appcompat, de. 'SupportedOrientations possible values: unspecified, landscape or portrait.
0 Comments
Leave a Reply. |