1.05 ice.zxing.b4aZXingLib JhsIceZxing1 activity result(atype as String,Value as String, image as Bitmap) timedout(timedOut as boolean) usercancelled(userCancelled as boolean) android.permission.CAMERA android.hardware.camera android.hardware.camera.autofocus android.permission.VIBRATE android.permission.FLASHLIGHT CreateAztecCode android.graphics.Bitmap str java.lang.String CreateDataMatrixCode android.graphics.Bitmap str java.lang.String BeginScan Start the scan Example:<code> Dim zx As JhsIceZxing1 '(declare this in Sub Globals) Dim bm As Bitmap '(declare this in Sub Globals) Sub Button1_Click zx.isportrait = True zx.useFrontCam = False 'set the timeoutDuration to a very high value (such as 2000000000) if you dont want it to time out 2000000000 = 63 years zx.timeoutDuration = 30 'change these factors between 0 and 1 to change the size of the viewfinder rectangle 'the library will limit the minimum size to 240 x 240 pixels and the maximum to (screen width) x (screen height) pixels zx.theViewFinderXfactor = 0.7 zx.theViewFinderYfactor = 0.5 zx.theFrameColor = Colors.Blue zx.theLaserColor = Colors.Yellow zx.theMaskColor = Colors.argb(95, 0, 0, 255) zx.theResultColor = Colors.Green zx.theResultPointColor = Colors.Red 'set the prompt messages zx.theTopPromptMessage = "This was done......" zx.theTopPromptTextSize = 5%y 'text size zx.topPromptColor = Colors.Red zx.topPromptDistanceFromTop = 1%y 'pixel distance from top zx.theBottomPromptMessage = "Just for fun......" zx.theBottomPromptTextSize = 5%y 'text size zx.bottomPromptColor = Colors.Blue zx.bottomPromptDistanceFromBottom = 5%y 'pixel distance from top 'add a bitmap zx.theBitMap = bm zx.theBitmapPosition(40%x,10%y,20%x,20%x) zx.BeginScan("myzx") End Sub Sub myzx_result(atype As String,Values As String) Msgbox(Values,"type:" & atype) End Sub Sub myzx_noscan(atype As String,Values As String) Msgbox(Values,"type:" & atype) End Sub </code> void ba anywheresoftware.b4a.BA EventName java.lang.String CreateQRCode android.graphics.Bitmap str java.lang.String theBitmapPosition Specify the left, top, width, and height of the bitmap that will be placed on the mask Example:<code> zx.theBitmapPosition(40%x,10%y,20%x,20%x) </code> void left int top int width int height int ReturnBitmap returnbitmap boolean theLaserColor Specify the color of the laser Example:<code> zx.theLaserColor = Colors.Red </code> int useFrontCam Specify if the front facing or rear facing camera should be used Example:<code> zx.useFrontCam = False </code> boolean FORMATS_ONE_D java.lang.String theMaskColor Specify the color of the mask around the view finder rectangle Example:<code> zx.theMaskColor = Colors.ARGB(95, 0, 0, 255) </code> int timeoutDuration Specify the timeout duration - we need to get a successful scan before this else time out Example:<code> zx.timeoutDuration = 15 </code> Set this value to for eg 2000000000 for and "indefinate" timeout (2 000 000 000 = 63 years+) int theBitMap Specify the bitmap that should be loaded into the mask Example:<code> Dim bm As Bitmap bm.Initialize(File.DirAssets,"B4A.png") zx.theBitMap = bm </code> android.graphics.Bitmap mustBeep Specify if the device should make a beep sound upon a successful scan The default value is False The beep sound will be ToneGenerator.TONE_CDMA_ABBR_ALERT Example:<code> zx.mustBeep = True </code> boolean isportrait Specify if it should be portrait or landscape mode Example:<code> zx.isportrait = True </code> boolean theBottomPromptTextSize Specify the text size of the bottom prompt message Example:<code> zx.theBottomPromptTextSize = 5%y </code> int FORMATS_PRODUCT java.lang.String FORMATS_AZTEC java.lang.String displayOrientation Specify the display orientation (for eg on Nexus 5) Example:<code> zx.displayOrientation = 90 </code> int theTopPromptTextSize Specify the text size of the top prompt message Example:<code> zx.theTopPromptTextSize = 5%y </code> int bottomPromptColor Specify the color of the bottom prompt message Example:<code> zx.bottomPromptColor = Colors.Yellow </code> int theResultPointColor Specify the color of the possible result points being displayed during a scan Example:<code> zx.theResultPointColor = Colors.Green </code> int topPromptDistanceFromTop Specify the distance of the top prompt message from the top Example:<code> zx.topPromptDistanceFromTop = 1%x </code> int topPromptColor Specify the color of the top prompt message Example:<code> zx.topPromptColor = Colors.Magenta </code> int theViewFinderYfactor Scale factor for the height of the view finder rectangle The factor ranges from 0 to 1 (for a height &lt; 240 a default of 240 pixels will be applied) Example:<code> zx.theViewFinderYfactor = 0.5 </code> double moveLaser Specify if the laser should be static or move up/down The default value is False Example:<code> zx.moveLaser = True </code> boolean theTopPromptMessage Specify the top prompt message Example:<code> zx.theTopPromptMessage = "Hallo" </code> java.lang.String bottomPromptDistanceFromBottom Specify the distance of the bottom prompt message from the bottom Example:<code> zx.bottomPromptDistanceFromBottom = 1%x </code> int ScanMode Specify the bar code formats to scan If not specified then all code formats will be scanned Specify one of the following: PRODUCT_FORMATS, ONE_D_FORMATS, QR_CODE_FORMATS, DATA_MATRIX_FORMATS, AZTEC_FORMATS, PDF_417_FORMATS, TWO_D_FORMATS PRODUCT_FORMATS are the following: UPC A, UPC E, EAN 13, EAN 8, RSS 14 ONE_D_FORMATS are all the PRODUCT FORMATS plus the following: CODE 39, CODE 93, CODE 128, ITF TWO_D_FORMATS are the following: QR CODE, DATA MATRIX, AZTEC CODE, PDF 417 Example:<code> zx.ScanMode = "PRODUCT_FORMATS"; </code> java.lang.String FORMATS_TWO_D java.lang.String theViewFinderXfactor Scale factor for the width of the view finder rectangle The factor ranges from 0 to 1 (for a width &lt; 240 a default of 240 pixels will be applied) Example:<code> zx.theViewFinderXfactor = 0.5 </code> double theBottomPromptMessage Specify the bottom prompt message Example:<code> zx.theBottomPromptMessage = "B4A" </code> java.lang.String textSkewnessBottom Specify the text skewness for the bottom text message Example:<code> zx.textSkewnessBottom = -0.25 </code> float scanInvertedCodes Specify if normal or color inverted codes needs to be scanned The default value is false (i.e scan normal colored codes and not inverted colored codes) Example:<code> zx.scanInvertedCodes = False </code> boolean FORMATS_QR_CODE java.lang.String FORMATS_PDF_417 java.lang.String textSkewnessTop Specify the text skewness for the top text message Example:<code> zx.textSkewnessTop = -0.25 </code> float CODE_FORE_COLOR int FORMATS_DATA_MATRIX java.lang.String theFrameColor Specify the color of the outer frame of the view finder rectangle Example:<code> zx.theFrameColor = Colors.Black </code> int mustVibrate Specify if the device should vibrate upon a successful scan The default value is False It will vibrate for 400ms Example:<code> zx.mustVibrate = True </code> boolean CODE_BACK_COLOR int theResultColor Specify the color of the mask around the view finder rectangle after a successful scan Example:<code> zx.theResultColor = Colors.Black </code> int ice.zxing.CaptureActivity.IsChineseOrNot process isChineseCharacter boolean chineseStr java.lang.String 1.06 Johan/IceFairy333