Skip to content

Commit

Permalink
Release v3 (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaSpood authored Jul 30, 2024
1 parent 3b2f21a commit a216194
Show file tree
Hide file tree
Showing 47 changed files with 131 additions and 92 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
LIB_VERSION: ${{ steps.get_version.outputs.VERSION }}
GH_DRIVER_REPOSITORY_USERNAME: ${{ secrets.GH_DRIVER_REPOSITORY_USERNAME }}
GH_DRIVER_REPOSITORY_TOKEN: ${{ secrets.GH_DRIVER_REPOSITORY_TOKEN }}
- name: Rename the AAR file for GitHub release upload
run: mv enioka_scan/build/outputs/aar/enioka_scan-release.aar enioka_scan/build/outputs/aar/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aar
# - name: Rename the AAR file for GitHub release upload
# run: mv enioka_scan/build/outputs/aar/enioka_scan-release.aar enioka_scan/build/outputs/aar/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aar
- name: Restore json key
run: echo "${{ secrets.GOOGLE_API_PUB_JSON_BASE64 }}" | base64 --decode > ${{ github.workspace }}/service-account.json
- name: Restore keystore
Expand All @@ -54,14 +54,13 @@ jobs:
KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_KEYSTORE_PASSWORD }}
SIGNKEY_PASSWORD: ${{ secrets.GOOGLE_SIGNKEY_PASSWORD }}
KEY_ALIAS: ${{ secrets.GOOGLE_SIGNKEY_ALIAS }}
- name: Upload aab as artefact
uses: actions/upload-artifact@v4
with:
name: app-release
path: ${{ github.workspace }}/demoscannerapp/build/outputs/bundle/release/demoscannerapp-release.aab
- name: Rename the AAB file for GitHub release upload
run: mv demoscannerapp/build/outputs/bundle/release/demoscannerapp-release.aab demoscannerapp/build/outputs/bundle/release/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aab
- name: Create a GitHub release with the AAR file as an asset
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.get_version.outputs.VERSION }}
files: enioka_scan/build/outputs/aar/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aar
files: |
# enioka_scan/build/outputs/aar/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aar
demoscannerapp/build/outputs/bundle/release/enioka_scan-${{ steps.get_version.outputs.VERSION }}.aab
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
/.idea/libraries
.DS_Store
**/build/
**/debug/
**/release/
/captures
.externalNativeBuild
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.enioka.scanner:scanner:2.4.1:aar'
implementation 'com.enioka.scanner:enioka-scan-core:3.0.0:aar'
}
```

More artefacts may be required depending on your devices, the full list and compatibility matrix are
available in the documentation.
More artefacts are be required to add compatibility to your devices, the full list and compatibility
matrix are available in the documentation.

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.5.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
13 changes: 3 additions & 10 deletions demoscannerapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@ android {
defaultConfig {
applicationId "com.enioka.scanner.demoscannerapp"
minSdkVersion 19
targetSdkVersion 33
versionCode 6
versionName "1.0"
targetSdkVersion 34
versionCode 7
versionName "3.0.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file("debug.keystore")
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("SIGNKEY_PASSWORD")
}
release {
storeFile file("debug.keystore")
storePassword System.getenv("KEYSTORE_PASSWORD")
Expand All @@ -35,7 +29,6 @@ android {
applicationIdSuffix ".release"
}
debug {
signingConfig signingConfigs.debug
debuggable true
applicationIdSuffix ".debug"
}
Expand Down
2 changes: 2 additions & 0 deletions demoscannerapp/playstore/attributions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- App Icon by Ecommdesign (https://iconscout.com/free-icon/barcode-159)
- Feature Graphic generated with Hotpot (https://hotpot.ai/templates/google-play-feature-graphic/11)
Binary file added demoscannerapp/playstore/frature_graphic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions demoscannerapp/playstore/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This application is a demo for enioka Scan, a library that makes the integration of all barcode scanners easy in any Android application, avoiding vendor lock-in and lowering the cost of advanced scanner integration.

It is compatible with a wide variety of scanning devices, integrated or external, from different vendors such as Zebra, Honeywell, Athesi and more.

When there are no compatible hardware devices available, the library provides a camera reader based on ZBar (default) or ZXing.

Through a common abstraction, it provides access to the following methods (provided the hardware supports them):

- press/release the scanner's trigger
- pause/resume scanning abilities
- disconnect/reconnect scanners
- enable/disable illumination from the scanner
- enable/disable colored LEDs
- set scanner enabled symbologies

Finally, it provides a ready to use Service that handles scanner lifecycles, as well as a template Activity, allowing you to use scanners in a matter of minutes.

This app includes all of the library's compatibility modules.

Check out the library and its source code on GitHub: https://github.com/enioka-Haute-Couture/enioka_scan
Binary file added demoscannerapp/playstore/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demoscannerapp/playstore/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Integration library for all your Android barcode scanner integration needs
1 change: 0 additions & 1 deletion demoscannerapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:hardwareAccelerated="true"
android:theme="@style/AppTheme">
Expand Down
5 changes: 5 additions & 0 deletions demoscannerapp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_adaptive_back"/>
<foreground android:drawable="@mipmap/ic_launcher_adaptive_fore"/>
</adaptive-icon>
Binary file modified demoscannerapp/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified demoscannerapp/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified demoscannerapp/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified demoscannerapp/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified demoscannerapp/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
84 changes: 46 additions & 38 deletions docs/api/camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,33 @@ view refresh. You can force a refresh by pausing and resuming the camera.

:param AspectRatioMode mode: The mode to use for filling the camera preview. Can be one of the
following values:
- `0`: `fillWithCrop`: The preview will be scaled to fit the picture, cropping the sides if
needed. The aspect ratio of the preview will be kept.
- `1`: `fillWithBlackBars`: The preview will be scaled to fit the picture, with black bars on
the sides if needed. The aspect ratio of the preview will be kept.
- `2`: `fillWithStretch`: The preview will fill the available space, by squashing or stretching
the preview if needed. The aspect ratio of the preview can be altered.

.. image:: /pictures/crop.png
:width: 400
:alt: fillWithCrop
- `0`: `fillWithCrop`: The preview will be scaled to fit the picture, cropping the sides if
needed. The aspect ratio of the preview will be kept.
- `1`: `fillWithBlackBars`: The preview will be scaled to fit the picture, with black bars on
the sides if needed. The aspect ratio of the preview will be kept.
- `2`: `fillWithStretch`: The preview will fill the available space, by squashing or stretching
the preview if needed. The aspect ratio of the preview can be altered.
:::

Example of a preview with the `fillWithCrop` mode.
Example of a preview with the `fillWithCrop` mode:

.. image:: /pictures/black_bars.png
:::{image} /pictures/crop.png
:width: 400
:alt: fillWithBlackBars
:alt: Example of a preview with the `fillWithCrop` mode.
:::

Example of a preview with the `fillWithBlackBars` mode.
Example of a preview with the `fillWithBlackBars` mode:

.. image:: /pictures/stretch.png
:::{image} /pictures/black_bars.png
:width: 400
:alt: fillWithStretch
:alt: Example of a preview with the `fillWithBlackBars` mode.
:::

Example of a preview with the `fillWithStretch` mode.
Example of a preview with the `fillWithStretch` mode:

:::{image} /pictures/stretch.png
:width: 400
:alt: Example of a preview with the `fillWithStretch` mode.
:::

:::{method} setReaderMode(CameraReader readerMode) -> void
Expand Down Expand Up @@ -143,8 +145,8 @@ To use this view in your own layout, you can add the following block to its XML
the attributes to your needs:

```xml
<com.enioka.scanner.camera.CameraBarcodeScanView
android:id="@+id/camera_scan_view"
<com.enioka.scanner.sdk.camera.CameraBarcodeScanView
android:id="@+id/cameraScanView"
android:layout_width="0dp"
android:layout_height="0dp"
app:forceCameraApiVersion="Auto"
Expand All @@ -162,8 +164,7 @@ the attributes to your needs:
app:targetColorPaused="@color/defaultItemColor"
app:targetIsFixed="false"
app:targetStrokeWidth="5"
app:useAdaptiveResolution="true"
/>
app:useAdaptiveResolution="true" />
```

The main XML attributes are as follow:
Expand Down Expand Up @@ -194,12 +195,12 @@ The maximum vertical resolution of the camera preview, useful to limit performan
:::{method} app:previewRatioMode

The mode to use for filling the camera preview. Can be one of the following values:
- `0`: `fillWithCrop`: The preview will be scaled to fit the picture, cropping the sides if
needed. The aspect ratio of the preview will be kept.
- `1`: `fillWithBlackBars`: The preview will be scaled to fit the picture, with black bars on
the sides if needed. The aspect ratio of the preview will be kept.
- `2`: `fillWithStretch`: The preview will fill the available space, by squashing or stretching
the preview if needed. The aspect ratio of the preview can be altered.
- `0`: `fillWithCrop`: The preview will be scaled to fit the picture, cropping the sides if
needed. The aspect ratio of the preview will be kept.
- `1`: `fillWithBlackBars`: The preview will be scaled to fit the picture, with black bars on
the sides if needed. The aspect ratio of the preview will be kept.
- `2`: `fillWithStretch`: The preview will fill the available space, by squashing or stretching
the preview if needed. The aspect ratio of the preview can be altered.

If the value of this attribute is not recognized or defined, the preview ratio mode will be set
by default to `fillWithCrop`.
Expand Down Expand Up @@ -263,17 +264,24 @@ The mode to use for filling the camera preview. Can be one of the following valu
:returns: A map containing the IDs of the views used by the camera scanner. May be replaced with
your own.

Contains the following keys:
- layout_id_camera: The ID of the layout containing the camera view.
- camera_view_id: The ID of the camera view in the layout.
- scanner_toggle_view_id: The ID of the view that toggles the scanner library reader.
- scanner_toggle_pause_id: The ID of the view that toggles the pause of the scanner.
- card_last_scan_id: ID of the card view that displays the last scan.
- constraint_layout_id: The ID of the constraint layout inside the camera layout.
- scanner_flashlight_id: The ID of the optional ImageButton on which to press to toggle the
flashlight/illumination.
- scanner_bt_provider_logs: The ID of the optional ImageButton on which to press to manually access
available providers logs
It contains the following values:
- `layout_id_camera`: The ID of the layout containing the camera view.
Set to `R.layout.activity_main_alt`.
- `camera_view_id`: The ID of the
[`CameraBarcodeScanView`](camera.md#the-camerabarcodescanview-class) inside the `layout_id_camera`
layout. Set to `R.id.cameraScanView`.
- `scanner_toggle_view_id`: The ID of the optional ImageButton on which to press to toggle the
zxing/zbar camera scan library. Set to `R.id.scannerSwitchZxing`.
- `scanner_toggle_pause_id`: The ID of the optional toggle button on which to press to pause/unpause
the scanner. Set to `R.id.scannerSwitchPause`.
- `card_last_scan_id`: The ID of the card view that displays the last scan.
Set to `R.id.cardCameraLastScan`.
- `constraint_layout_id`: The ID of the constraint layout inside the camera layout.
Set to `R.id.constraintLayoutMainActivity`.
- `scanner_flashlight_id`: The ID of the optional ImageButton on which to press to toggle the
flashlight/illumination. Set to `R.id.scannerFlashlight`.
- `scanner_bt_provider_logs`: The ID of the optional ImageButton on which to press to manually access
available providers logs. Set to `R.id.scannerBtProviderLogs`.
:::

:::{method} getCameraScanner(Context ctx, ScannerConnectionHandler handler, ScannerSearchOptions options) -> void
Expand Down
35 changes: 17 additions & 18 deletions docs/api/scanner_activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,23 @@ The hashmap containing the IDs of the views used by the camera scanner. May be r
own.

If the camera SDK is included, it will be set to a map containing the following values:
- layout_id_camera: The ID of the layout containing the camera view
:::{cpp:var}R.layout.activity_main_alt:::.
- camera_view_id: The ID of the camera view in the layout :::{cpp:var}R.id.cameraScanView:::.
It is the ID of the [`CameraBarcodeScanView`](camera.md#the-camerabarcodescanview-class) inside the
`layout_id_camera` layout.
:::.
- scanner_toggle_view_id: It is the ID of the optional ImageButton on which to press to toggle the
zxing/zbar camera scan library :::{cpp:var}R.id.scannerSwitchZxing:::.
- scanner_toggle_pause_id: The ID of the optional toggle button on which to press to pause/unpause
the scanner :::{cpp:var}R.id.scannerSwitchPause:::.
- card_last_scan_id: ID of the card view that displays the last scan
:::{cpp:var}R.id.cardCameraLastScan:::.
- constraint_layout_id: The ID of the constraint layout inside the camera layout
:::{cpp:var}R.id.constraintLayoutMainActivity:::.
- scanner_flashlight_id: The ID of the optional ImageButton on which to press to toggle the
flashlight/illumination :::{cpp:var}R.id.scannerFlashlight:::.
- scanner_bt_provider_logs: The ID of the optional ImageButton on which to press to manually access
available providers logs :::{cpp:var}R.id.scannerBtProviderLogs:::.
- `layout_id_camera`: The ID of the layout containing the camera view.
Defaults to `R.layout.activity_main_alt`.
- `camera_view_id`: The ID of the
[`CameraBarcodeScanView`](camera.md#the-camerabarcodescanview-class) inside the `layout_id_camera`
layout. Defaults to `R.id.cameraScanView`.
- `scanner_toggle_view_id`: The ID of the optional ImageButton on which to press to toggle the
zxing/zbar camera scan library. Defaults to `R.id.scannerSwitchZxing`.
- `scanner_toggle_pause_id`: The ID of the optional toggle button on which to press to pause/unpause
the scanner. Defaults to `R.id.scannerSwitchPause`.
- `card_last_scan_id`: The ID of the card view that displays the last scan.
Defaults to `R.id.cardCameraLastScan`.
- `constraint_layout_id`: The ID of the constraint layout inside the camera layout.
Defaults to `R.id.constraintLayoutMainActivity`.
- `scanner_flashlight_id`: The ID of the optional ImageButton on which to press to toggle the
flashlight/illumination. Defaults to `R.id.scannerFlashlight`.
- `scanner_bt_provider_logs`: The ID of the optional ImageButton on which to press to manually access
available providers logs. Defaults to `R.id.scannerBtProviderLogs`.
:::

:::{cpp:var} int cameraToggleId = R.id.scannerBtCamera
Expand Down
2 changes: 1 addition & 1 deletion docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ devices.
| `provicer-os-honeywell-bt` | `BT_HoneywellOssSppProvider` | Honeywell bluetooth scanners | Honeywell Voyager 1602g | BT Classic | | Bluetooth device responds to "Get firmware" command |
| `provider-os-zebra-bt` | `BT_ZebraOssSPPProvider` | Zebra bluetooth scanners using the SSI protocol | Zebra RS5100 | BT Classic | | Bluetooth device is not BLE and responds to "CAPABILITIES_REQUEST" command |
| `provider-os-zebra-bt` | `BT_ZebraOssATTProvider` | Zebra bluetooth scanners using the SSI protocol | Zebra RS5100 | BT Low Energy | | Bluetooth device is BLE and responds to "CAPABILITIES_REQUEST" command |
| `provider-os-zebra-dw` | `ZebraDwProvider` | Any device compatible with Zebra Datawedge | Zebra TC25, Zebra TC27 | Integrated | Zebra Datawedge service (should be preinstalled on device) | Application package `com.symbol.datawedge` exists |
| `provider-os-honeywell-integrated` | `HoneywellOssIntegratedProvider` | Honeywell integrated scanners | Honeywell EDA52 | Integrated | Honeywell service (should be preinstalled on device) | Intent `com.honeywell.decode.DecodeService` has a listener |
| `provider-cs-proglove` | `ProgloveProvider` | Proglove devices interfacing with their application | Proglove Glove Mark II | BT Low Energy | Proglove application | Application package `de.proglove.connect` exists |
| `provider-cs-honeywell` | `HONEYWELL_AIDC` | Honeywell AIDC / Intermec integrated devices | Honeywell EDA50 | Integrated | AIDC SDK, Honeywell service (should be preinstalled on device) | Intent `com.honeywell.decode.DecodeService` has a listener and AIDC SDK exists |
| `provider-cs-koamtac` | `Koamtac` | Koamtac bluetooth KDC devices | Koamtac KDC180 | BT Low Energy | Koamtac SDK | Class `koamtac.kdc.sdk.KDCReader` exists and scanner device is found |
| `provider-cs-m3` | `M3RingScannerProvider` | M3Mobile bluetooth ring scanners | M3 Ring Scanner | BT Classic | Ring Scanner SDK, Ring Scanner application | Class `com.m3.ringscannersdk.RingScannerService` exists, application package `com.m3.ringscanner` exists, scanner device is found |
| `provider-cs-zebra` | `BtZebraProvider` | Zebra bluetooth scanners | Zebra RS6000, RS5100 | BT Classic | Zebra SDK | Class `com.zebra.scannercontrol.SDKHandler` exists and scanner device is found |
| `provider-cs-zebra` | `Zebra EMDK` | Zebra EMDK integrated scanners | Zebra TC25 | Integrated | Zebra EMDK SDK (should be preinstalled on device) | Class `com.symbol.emdk.EMDKManager` exists |
| `provider-os-zebra-dw` | `ZebraDwProvider` | Any device compatible with Zebra Datawedge | Zebra TC25, Zebra TC27 | Integrated | Zebra Datawedge service (should be preinstalled on device) | Application package `com.symbol.datawedge` exists |

:::

Expand Down
Loading

0 comments on commit a216194

Please sign in to comment.