Skip to content

Commit

Permalink
feat: Extract camera scanner from core library as a new activity
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentKobz committed Apr 17, 2024
1 parent e1233eb commit 5028b95
Show file tree
Hide file tree
Showing 48 changed files with 823 additions and 250 deletions.
1 change: 1 addition & 0 deletions demoscannerapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ android {
dependencies {
// Reference our own library, directly compiled from its project
implementation project(':enioka_scan');
implementation project(':enioka_scan_camera');

if (gradle.ext.withHoneywell) {
implementation project(':enioka_scan_honeywell');
Expand Down
16 changes: 8 additions & 8 deletions enioka_scan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'

// ZBAR & ZXING (Zebra Crossing) = camera. From Maven Central.
api('me.dm7.barcodescanner:zbar:1.9.8') {
transitive = false
}
api('me.dm7.barcodescanner:core:1.9.8') {
transitive = false
}
api 'com.google.zxing:core:3.5.1'
// // ZBAR & ZXING (Zebra Crossing) = camera. From Maven Central.
// api('me.dm7.barcodescanner:zbar:1.9.8') {
// transitive = false
// }
// api('me.dm7.barcodescanner:core:1.9.8') {
// transitive = false
// }
// api 'com.google.zxing:core:3.5.1'

// Test things (useless for now)
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
Expand Down
7 changes: 0 additions & 7 deletions enioka_scan/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,13 @@

</application>

<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="false" />
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<!-- For newer API versions -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void onAttach(Context activity) {
// The host should be an activity implementing a barcode listener.
cb = (ScannerClient) activity;
} catch (ClassCastException e) {
throw new ClassCastException(activity.toString() + " must implement ScannerDataCallback");
throw new ClassCastException(activity.toString() + " must implement ScannerClient");
}
}

Expand Down
Loading

0 comments on commit 5028b95

Please sign in to comment.