Skip to content

Repository files navigation

Description

Scan image captured image and crop image for select specificate code or multiple codes.

The base this library in two references:

Implementations

1.Add implementation in your class:

ResponseExtenCropML

2.Add function responseListener, this function you can using for listener response.

Example:

overridefunresponseListener(response:Response?) {
if(response!!.result.equals(Result.OK)){
var concat:String=""
response!!.barcodes.forEach {
if(it.selected){
concat +="\n"+ it.code
}
}
print(concat)
}elseif(response!!.result.equals(Result.BAD_SUCCESS)){
print("Image not process for any error")
}elseif(response!!.result.equals(Result.TIME_OUT)){
print("Process time out. ")
}
}

3.For start the action calling the next code:
funonclick(view:View){
ExtensionCropML.start(this,OptionsML.FORMAT_ALL_FORMATS)
}

* For more information you can see complete code into the next link Code

Table Options

ConfigTypeDescription
OPTIONS_SELECTED_ALLBooleanReturn at once the scan options
OPTIONS_DIALOG_TITLEStringSet your title dialog.
OPTIONS_DIALOG_BUTTON_ACCEPTStringSet title button dialog.
OPTIONS_NEW_PICTUREStringChange crop title
OPTIONS_NEW_PICTURE_DESCStringChange description crop for add rules or any text.

Example:

funonclick(view:View){
ExtensionCropML.OPTIONS_DIALOG_TITLE="My dialog"ExtensionCropML.OPTIONS_SELECTED_ALL=trueExtensionCropML.OPTIONS_DIALOG_BUTTON_ACCEPT="Please acept options"ExtensionCropML.OPTIONS_NEW_PICTURE="New barcode capture"ExtensionCropML.OPTIONS_NEW_PICTURE_DESC="Cut picture on barcode"ExtensionCropML.start(this,OptionsML.FORMAT_ALL_FORMATS)
}

Example View:

Gradle Dependency

  • Add the JitPack repository to your project's build.gradle file

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
  • Add the dependency in your app's build.gradle file
 implementation 'com.github.LordSaac:BarCodeCrop_ML:v1.0.0'

Contribution

You are most welcome to contribute to this project!


Released August 29, 2021

Licence

Copyright 2021 Isaac G. Banda

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Scan barcode image captured image and crop image for select specificate code or multiple codes.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages