Barcode Xpress Mobile for Android

BXResult Class Reference

Defines a class that manages the values returned by the decoding functions of the native library. More...

Inherits android::os::Parcelable.

List of all members.

Public Member Functions

 BXResult (long decodingTime, long barcodeType, String str, byte[] data, long length, long confidence, BXResultIdentLocation p1, BXResultIdentLocation p2, BXResultIdentLocation p3, BXResultIdentLocation p4, int status, long binarizationTime)
 Construct a Result.
int describeContents ()
 Required to implement Parcelable.
long getBarcodeType ()
 Obtain the type of barcode that was recognized.
long getBinarizationTime ()
 Obtain the time spent binarizing the image.
long getConfidence ()
 Obtain the decoding confidence, valued 0..100, where 100 is the most certain.
String getDataString ()
 Obtain a string that contains the decoded value of the barcode.
byte[] getDataBytes ()
 Obtain a byte array that contains the raw decoded value of the barcode.
Long getDataLength ()
 Obtain the length, in bytes, of the decoded data.
long getDecodingTime ()
 Get the time spent decoding the image, in milliseconds.
BXResultIdentLocation[] getResultPoints ()
 Obtain the four points inside the image which contain the area which was decoded.
int getResultStatus ()
 Obtain the decoding status, returned by the native decoding library, and defined in BXResult.
void writeToParcel (Parcel dest, int flags)
 Required to implement Parcelable.

Static Public Attributes

static final int STATUS_DECODED = 0
 Status STATUS_DECODED.
static final int STATUS_NO_BC_FOUND = 1
 Status STATUS_NO_BC_FOUND.
static final int STATUS_INVALID_LICENSE = 2
 Status STATUS_INVALID_LICENSE.
static final int STATUS_UNSUPPORTED_BIT_DEPTH = 3
 Status UNSUPPORTED_BIT_DEPTH.
static final int STATUS_BLURRED = 4
 Status STATUS_BLURRED.
static final int STATUS_EXCEPTION = 5
 Status STATUS_EXCEPTION.
static final int STATUS_UNSUPPORTED_BARCODE_TYPE = 6
 Status STATUS_UNSUPPORTED_BARCODE_TYPE.
static final
Parcelable.Creator< BXResult
CREATOR
 Required to implement Parcelable.

Detailed Description

Defines a class that manages the values returned by the decoding functions of the native library.


Constructor & Destructor Documentation

BXResult ( long  decodingTime,
long  barcodeType,
String  str,
byte[]  data,
long  length,
long  confidence,
BXResultIdentLocation  p1,
BXResultIdentLocation  p2,
BXResultIdentLocation  p3,
BXResultIdentLocation  p4,
int  status,
long  binarizationTime 
) [inline]

Construct a Result.

Parameters:
decodingTimeThe time, in milliseconds, spent decoding the image.
barcodeTypeThe type of barcode that was found.
strDecoded value, represented as a string.
dataDecoded value, raw bytes.
lengthLength, in bytes, of the decoded value.
confidence0..100, with 100 being the most certain.
p1Top left point in the rectangle surrounding the barcode.
p2Top right point in the rectangle surrounding the barcode.
p3Lower right point in the rectangle surrounding the barcode.
p4Lower left point in the rectangle surrounding the barcode.
statusOne of the possible status values defined in BXResult.
binarizationTimeThe time, in milliseconds, spent binarizing the image.

Member Function Documentation

long getBarcodeType ( ) [inline]

Obtain the type of barcode that was recognized.

Types are defined in BXTypeConstants.

Returns:
long getBinarizationTime ( ) [inline]

Obtain the time spent binarizing the image.

Binarization is a pre-processing stage before recognition, and binarization time is included in the decoding time.

Returns:
Time, in milliseconds.
long getConfidence ( ) [inline]

Obtain the decoding confidence, valued 0..100, where 100 is the most certain.

Returns:
byte [] getDataBytes ( ) [inline]

Obtain a byte array that contains the raw decoded value of the barcode.

Returns:
Long getDataLength ( ) [inline]

Obtain the length, in bytes, of the decoded data.

Returns:
String getDataString ( ) [inline]

Obtain a string that contains the decoded value of the barcode.

Returns:
long getDecodingTime ( ) [inline]

Get the time spent decoding the image, in milliseconds.

This includes the time spent running the optional blurred image rejection filter and binarizing the image. This value is only set by internal debug builds of the native library, and is always zero for released builds.

Returns:
Time, in milliseconds.
BXResultIdentLocation [] getResultPoints ( ) [inline]

Obtain the four points inside the image which contain the area which was decoded.

Returns:
An array of four BXResultIdentLocation, each of which contains one of the four points (x,y) in the pixel address space of the image, which contains the recognized barcode. The points are ordered:
  • m_resultPoints[0] = top left
  • m_resultPoints[1] = top right
  • m_resultPoints[2] = lower right
  • m_resultPoints[3] = lower left *
int getResultStatus ( ) [inline]

Obtain the decoding status, returned by the native decoding library, and defined in BXResult.

Returns:
One of the status values defined in BXResult.

Member Data Documentation

final Parcelable.Creator<BXResult> CREATOR [static]
Initial value:
 new Parcelable.Creator<BXResult>() {
                                
                                public BXResult createFromParcel(Parcel in) {
                                                return new BXResult(in);
                                }

                                
                                public BXResult[] newArray(int size) {
                                                return new BXResult[size];
                                }
                }

Required to implement Parcelable.