You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -767,6 +771,12 @@ <h2>Develop with Barcode Scanner Component</h2>
767
771
<h2>Develop with Foundational APIs</h2>
768
772
</div>
769
773
<divclass="children">
774
+
<divclass="file">
775
+
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Scan from a window and add the scanned item to the cart.">
776
+
<spanclass="android-label">CartBuilder</span> -
777
+
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/android/FoundationalAPISamples/CartBuilder" title="View source code on GitHub">Source</a>
778
+
</span>
779
+
</div>
770
780
<divclass="file">
771
781
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Decode barcodes from an existing image file.">
@@ -809,6 +819,18 @@ <h2>Develop with Foundational APIs</h2>
809
819
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/android/FoundationalAPISamples/ReadGS1AI" title="View source code on GitHub">Source</a>
810
820
</span>
811
821
</div>
822
+
<divclass="file">
823
+
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Read all currently visible barcodes.">
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/android/FoundationalAPISamples/ReadMultipleBarcodes" title="View source code on GitHub">Source</a>
826
+
</span>
827
+
</div>
828
+
<divclass="file">
829
+
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Continuously read barcodes and add newly detected unique barcodes to the list.">
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/android/FoundationalAPISamples/ReadMultipleUniqueBarcodes" title="View source code on GitHub">Source</a>
832
+
</span>
833
+
</div>
812
834
<divclass="file">
813
835
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Optimize settings for scanning tiny or small barcodes.">
@@ -795,6 +799,12 @@ <h2>Develop with Barcode Scanner Component</h2>
795
799
<h2>Develop with Foundational APIs</h2>
796
800
</div>
797
801
<divclass="children">
802
+
<divclass="file">
803
+
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Scan from a window and add the scanned item to the cart.">
804
+
<spanclass="ios-label">CartBuilder</span> -
805
+
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/ios/FoundationalAPISamples/CartBuilder" title="View source code on GitHub">Source</a>
806
+
</span>
807
+
</div>
798
808
<divclass="file">
799
809
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Decode barcodes from an existing image file.">
800
810
<spanclass="ios-label">DecodeFromAnImage</span> -
@@ -837,6 +847,18 @@ <h2>Develop with Foundational APIs</h2>
837
847
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/ios/FoundationalAPISamples/ReadGS1AI" title="View source code on GitHub">Source</a>
838
848
</span>
839
849
</div>
850
+
<divclass="file">
851
+
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Read all currently visible barcodes.">
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/ios/FoundationalAPISamples/ReadMultipleBarcodes" title="View source code on GitHub">Source</a>
854
+
</span>
855
+
</div>
856
+
<divclass="file">
857
+
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Continuously read barcodes and add newly detected unique barcodes to the list.">
<aclass="button title source-link" href="https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/ios/FoundationalAPISamples/ReadMultipleUniqueBarcodes" title="View source code on GitHub">Source</a>
860
+
</span>
861
+
</div>
840
862
<divclass="file">
841
863
<spandata-balloon-length="large" data-balloon-pos="down" aria-label="Optimize settings for scanning tiny or small barcodes.">
<lilang="android" ><ahref="{{ site.features }}use-region-predetection.html?lang=android" class="otherLinkColour">Pre-detect Region of Interest (ROI)</a></li>
<lilang="objectivec-swift" ><ahref="{{ site.features }}use-region-predetection.html?lang=objc,swift" class="otherLinkColour">Pre-detect Region of Interest (ROI)</a></li>
`DecodedBarcodesResult` is the barcode-type result returned by the Dynamsoft Barcode Reader SDK. It represents all barcode-related information captured from a single image or video frame.
14
+
15
+
It contains:
16
+
17
+
- All decoded barcodes.
18
+
- Metadata about the original image.
19
+
- Error information when a failure occurs.
20
+
- A rotation transformation matrix if the original image includes rotation info.
-`text`: The decoded string. This is the most common field used for downstream processing.
85
+
-`formatString`: The barcode symbology (for example, `QR_CODE`, `EAN_13`).
86
+
-`bytes`: Raw payload bytes. By default, barcode text is interpreted using ISO-8859-1. Use this when the payload contains binary data or requires custom decoding.
87
+
-`location`: Corner points of the barcode in the image, useful for drawing overlays.
88
+
-`confidence`: A confidence score. Higher values indicate more reliable decoding.
89
+
-`details`: Symbology-specific details (varies by barcode type).
90
+
91
+
### Access the Original Image
92
+
93
+
The original image is not returned by default. In `onDecodedBarcodesReceived`, you receive the original image `HashId`. Use it to fetch the image when needed.
title: Understand Barcode Results - Dynamsoft Barcode Reader for Android
4
+
description: Understand the structure of the barcode decoding results of Dynamsoft Barcode Reader Android.
5
+
keywords: understand results, Android
6
+
needAutoGenerateSidebar: true
7
+
needGenerateH3Content: true
8
+
noTitleIndex: true
9
+
---
10
+
11
+
# Understanding Barcode Scan Results
12
+
13
+
`BarcodeScanResult` is the object returned by the `onScanResult` callback when a scanning session finishes, is canceled, or encounters an error. Every `BarcodeScanResult` contains a `resultStatus` and a list of barcodes.
14
+
The barcode list is non-empty only when `resultStatus` is `RS_FINISHED`.
15
+
16
+
```java
17
+
launcher = registerForActivityResult(
18
+
newBarcodeScannerActivity.ResultContract(),
19
+
result -> {
20
+
// User code for using the the scan result.
21
+
}
22
+
);
23
+
```
24
+
25
+
## How to Use
26
+
27
+
### Check Status and Error Messages
28
+
29
+
Always check `resultStatus` before accessing the decoded barcodes.
30
+
31
+
-`RS_FINISHED`: Scanning completed successfully. At least one barcode is available.
32
+
-`RS_CANCELED` / `RS_EXCEPTION`: No barcodes are returned.
33
+
34
+
`RS_EXCEPTION` might be caused by:
35
+
36
+
- You configured an invalid or expired license via `setLicense`.
37
+
- You configured an invalid template via `setTemplateFile`.
38
+
39
+
### Access decoded barcodes
40
+
41
+
Each decoded barcode is a `BarcodeResultItem` from `result.getBarcodes()`. The following is an example of a `BarcodeResultItem`:
-`text`: The decoded string. This is the most common field used for downstream processing.
62
+
-`formatString`: The barcode symbology (for example, `QR_CODE`, `EAN_13`).
63
+
-`bytes`: Raw bytes of the barcode payload. By default, barcode text is interpreted using ISO-8859-1. Use this field when the payload contains binary data or requires custom decoding.
64
+
-`location`: Corner points of the barcode in the image, useful for drawing overlays.
65
+
-`confidence`: A confidence score. Higher values indicate more reliable decoding.
66
+
-`details`: Symbology-specific details (varies by barcode type).
67
+
68
+
## Explore Result Details
69
+
70
+
This page provides a high-level overview of barcode scan results.
71
+
For more detailed usage and advanced scenarios, see the following topics:
72
+
73
+
-[Get barcode confidence and rotation]({{ site.features }}get-confidence-rotation.html?lang=android)
0 commit comments