Class BarcodeResult


  • public class BarcodeResult
    extends Object
    This contains the result of a barcode scan. This class delegate all read-only fields of Result, and adds a bitmap with scanned barcode.
    • Field Detail

      • mResult

        protected com.google.zxing.Result mResult
    • Constructor Detail

      • BarcodeResult

        public BarcodeResult​(com.google.zxing.Result result,
                             SourceData sourceData)
    • Method Detail

      • getResult

        public com.google.zxing.Result getResult()
        Returns:
        wrapped Result
      • getTransformedResultPoints

        public List<com.google.zxing.ResultPoint> getTransformedResultPoints()
      • getBitmapWithResultPoints

        public Bitmap getBitmapWithResultPoints​(int color)
        Parameters:
        color - Color of result points
        Returns:
        Bitmap with result points on it, or plain bitmap, if no result points
      • getBitmapScaleFactor

        public int getBitmapScaleFactor()
        Returns:
        Bitmap preview scale factor
      • getText

        public String getText()
        Returns:
        raw text encoded by the barcode
        See Also:
        Result.getText()
      • getRawBytes

        public byte[] getRawBytes()
        Returns:
        raw bytes encoded by the barcode, if applicable, otherwise null
        See Also:
        Result.getRawBytes()
      • getResultPoints

        public com.google.zxing.ResultPoint[] getResultPoints()
        Returns:
        points related to the barcode in the image. These are typically points identifying finder patterns or the corners of the barcode. The exact meaning is specific to the type of barcode that was decoded.
        See Also:
        Result.getResultPoints()
      • getBarcodeFormat

        public com.google.zxing.BarcodeFormat getBarcodeFormat()
        Returns:
        BarcodeFormat representing the format of the barcode that was decoded
        See Also:
        Result.getBarcodeFormat()
      • getResultMetadata

        public Map<com.google.zxing.ResultMetadataType,​Object> getResultMetadata()
        Returns:
        Map mapping ResultMetadataType keys to values. May be null. This contains optional metadata about what was detected about the barcode, like orientation.
        See Also:
        Result.getResultMetadata()
      • getTimestamp

        public long getTimestamp()
      • transformResultPoints

        public static List<com.google.zxing.ResultPoint> transformResultPoints​(List<com.google.zxing.ResultPoint> resultPoints,
                                                                               SourceData sourceData)