feat: Implement CoreCaptureEngine and ScannerEngine for barcode scanning functionality
- Added CoreCaptureEngine to manage capture features and configurations. - Introduced CaptureFeature enum to define available capture features. - Created CaptureFeatureEngine interface for feature-specific implementations. - Developed ScannerEngine to handle QR and barcode scanning using ML Kit. - Implemented ScannerDelegate interface for handling scan results and errors. - Added ScannerEngineActivity to provide a UI for scanning with Compose. - Created UploadEngine class for handling uploads with presigned URLs. - Established iCameraSDK for SDK initialization and telemetry reporting. - Added TelemetryDetector for monitoring device and app telemetry. - Defined ICameraSDKError enum for error handling within the SDK. - Included example unit test for basic functionality verification. - Updated settings.gradle to include the new SDK module.
This commit is contained in:
71
android/sdk/build.gradle.kts
Normal file
71
android/sdk/build.gradle.kts
Normal file
@@ -0,0 +1,71 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.lynkedup.icamera.sdk"
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 26
|
||||
targetSdk = 36
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// AndroidX
|
||||
implementation("androidx.core:core-ktx:1.17.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("com.google.android.material:material:1.13.0")
|
||||
implementation("androidx.activity:activity:1.11.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.4")
|
||||
|
||||
// Camera dependencies
|
||||
implementation("androidx.camera:camera-view:1.5.1")
|
||||
implementation("androidx.camera:camera-lifecycle:1.5.1")
|
||||
implementation("androidx.camera:camera-camera2:1.5.1")
|
||||
|
||||
// ML Kit Barcode Scanning
|
||||
implementation("com.google.mlkit:barcode-scanning-common:17.0.0")
|
||||
implementation("com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1")
|
||||
|
||||
// Compose dependencies
|
||||
implementation("androidx.activity:activity-compose:1.11.0")
|
||||
implementation(platform("androidx.compose:compose-bom:2024.09.00"))
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.ui:ui-graphics")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||
implementation("androidx.compose.material3:material3:1.4.0")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||
|
||||
// Testing
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.3.0")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
|
||||
androidTestImplementation(platform("androidx.compose:compose-bom:2024.09.00"))
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||
}
|
||||
Reference in New Issue
Block a user