Skip to content

Commit bbb4197

Browse files
committed
scanner v6.0.5
1 parent 1fc5f20 commit bbb4197

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+532
-392
lines changed

docs/scanner/changelog.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 2025.06.19 [v6.0.5]
2+
3+
```
4+
## Major Update
5+
6+
This latest release represents a major update to the extension. The scanning algorithm has been completely rewritten to improve performance and accuracy.
7+
The aging ZBar SDK has been removed in favour of **MLKit** on Android and the **Vision framework** on iOS.
8+
9+
As part of the update we have improved the permission process and broadcast receiver usage to meet the updated android API 34 requirements.
10+
11+
Additionally we have implemented an asynchronous bitmap data scanning process which allows you to scan large images without blocking the main thread.
12+
13+
Overall this update should provide a much better experience for your users and improve the reliability of scanning barcodes in your applications.
14+
15+
See the migration guide: https://docs.airnativeextensions.com/docs/scanner/migrating-to-v6.0
16+
17+
18+
### Updates
19+
20+
feat(ios): integration of new Vision framework based algorithm (resolves https://github.com/distriqt/ANE-Scanner/issues/71)
21+
feat(ios): add better focus implementation for new vision algorithm (resolves https://github.com/distriqt/ANE-Scanner/issues/74)
22+
feat(android): update implementation to use MLKit scanning algorithm (resolves https://github.com/distriqt/ANE-Scanner/issues/49)
23+
fix(android): update permission process and receiver requirements for android api 34
24+
feat: implement async bitmap scanning
25+
feat(airpackage): update dependencies to latest (resolves https://github.com/distriqt/ANE-Scanner/issues/77)
26+
```
27+
128
### 2024.07.08 [v5.2.0]
229

330
```

docs/scanner/migrating-to-v6.0.mdx

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Migrating to v6.0
3+
sidebar_label: Migrating to v6.0
4+
---
5+
6+
import Tabs from '@theme/Tabs'
7+
import TabItem from '@theme/TabItem'
8+
9+
10+
This latest release represents a major update to the extension. The scanning algorithm has been completely rewritten to improve performance and accuracy.
11+
The aging ZBar SDK has been removed in favour of **MLKit** on Android and the **Vision framework** on iOS.
12+
13+
As part of the update we have improved the permission process and broadcast receiver usage to meet the updated android API 34 requirements.
14+
15+
Additionally we have implemented an asynchronous bitmap data scanning process which allows you to scan large images without blocking the main thread.
16+
17+
Overall this update should provide a much better experience for your users and improve the reliability of scanning barcodes in your applications.
18+
19+
20+
## Migration
21+
22+
<Tabs
23+
groupId="packagemanager"
24+
defaultValue="apm"
25+
values={[
26+
{label: 'APM', value: 'apm'},
27+
{label: 'Manual', value: 'manual'},
28+
]}>
29+
30+
<TabItem value="apm" >
31+
32+
If you are using [`apm`](https://github.com/airsdk/apm) all you need to do is update to the latest build and regenerate your application descriptor. `apm` will handle the rest.
33+
34+
```
35+
apm update
36+
apm generate app-descriptor
37+
```
38+
39+
</TabItem>
40+
<TabItem value="manual" >
41+
42+
If you are manually managing your application descriptor (and manifest additions) then you will be required to make some changes to your manifest. Find the activity:
43+
44+
```xml
45+
<activity
46+
android:name="com.distriqt.extension.scanner.zbar.ZBarScannerActivity"
47+
android:exported="false"/>
48+
```
49+
50+
And replace it with:
51+
52+
```xml
53+
<activity
54+
android:name="com.distriqt.extension.scanner.mlkit.ScannerActivity"
55+
android:exported="false"
56+
android:theme="@style/ScannerActivityTheme"
57+
android:configChanges="orientation|screenSize|screenLayout" />
58+
```
59+
60+
61+
Increase the minimum SDK version to 21:
62+
63+
```xml
64+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
65+
```
66+
67+
68+
</TabItem>
69+
70+
</Tabs>
71+
72+
73+
:::note New Algorithms
74+
The new scanning algorithms are significantly different from the previous ZBar implementation.
75+
You may need to adjust your code to accommodate the new API and behavior.
76+
In particular the orientation of the scanned results is no longer available and will always be 'unknown'.
77+
:::
78+
79+
80+
81+
## Android Gradle Version
82+
83+
We have updated the required gradle version used to build your application to be higher than the default AIR currently uses.
84+
85+
To specify a higher version add the following to your android node in your application descriptor:
86+
87+
```xml
88+
<android>
89+
<gradleVersion>8.9</gradleVersion>
90+
<androidGradlePluginVersion>8.7.3</androidGradlePluginVersion>
91+
92+
...
93+
</android>
94+
```
95+
96+
If you don't do this you will see the following error when building your application:
97+
98+
```
99+
Unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed:
100+
FAILURE: Build failed with an exception.
101+
102+
...
103+
104+
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65
105+
```
106+
107+
:::note
108+
June 2025: This is not currently automatically handled by `apm` so you will need to add this manually to your application descriptor.
109+
110+
We are working on an update to handle this.
111+
:::
112+
113+
114+
115+
## Asynchronous Scanning
116+
117+
The new scanning process allows you to scan large images without blocking the main thread. This is particularly useful for applications that need to scan high-resolution images or perform other tasks while scanning.
118+
119+
```actionscript
120+
Scanner.service.scanBitmapAsync(
121+
image.bitmapData,
122+
function ( scanResults:Vector.<ScanResult> ):void
123+
{
124+
// Handle the scan results
125+
for each ( var result:ScanResult in scanResults )
126+
{
127+
trace( "Code found: " + result.data );
128+
},
129+
function ( error:Error ):void
130+
{
131+
// process the error
132+
}
133+
);
134+
```
135+

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3014,6 +3014,7 @@ module.exports = {
30143014
},
30153015
{
30163016
Troubleshooting: [
3017+
"scanner/migrating-to-v6.0",
30173018
"scanner/migrating-to-v5.1",
30183019
"scanner/migrating-to-version-5",
30193020
"scanner/migrating-to-androidx",

static/asdocs/scanner/all-classes.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html>
22
<head>
33
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4-
<title>All Classes - distriqt // Scanner</title>
4+
<title>All Classes - Scanner</title>
55
<base target="classFrame">
66
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
77
<link rel="stylesheet" href="print.css" type="text/css" media="print">
@@ -25,6 +25,9 @@ <h3><a href="class-summary.html" target="classFrame" style="color:black">All Cla
2525
<tr>
2626
<td><a href="com/distriqt/extension/scanner/Orientation.html" title="com.distriqt.extension.scanner.Orientation">Orientation</a></td>
2727
</tr>
28+
<tr>
29+
<td><a href="com/distriqt/extension/scanner/events/ScanBitmapEvent.html" title="com.distriqt.extension.scanner.events.ScanBitmapEvent">ScanBitmapEvent</a></td>
30+
</tr>
2831
<tr>
2932
<td><a href="com/distriqt/extension/scanner/Scanner.html" title="com.distriqt.extension.scanner.Scanner">Scanner</a></td>
3033
</tr>
@@ -52,4 +55,4 @@ <h3><a href="class-summary.html" target="classFrame" style="color:black">All Cla
5255
</table>
5356
</body>
5457
</html>
55-
<!--Copyright distriqt 2016<br/>Mon Jul 8 2024, 04:23 PM +10:00 -->
58+
<!--Copyright Michael Archbold 2025<br/>Thu Jun 19 2025, 03:35 PM +10:00 -->

0 commit comments

Comments
 (0)