ArBarCodeProject is a cutting-edge mobile application built with Kotlin Multiplatform Mobile (KMM) and Compose Multiplatform, designed to integrate Augmented Reality (AR) and Barcode scanning functionalities. This project aims to provide a seamless and robust solution for various use cases involving barcode recognition and interactive AR experiences across both Android and iOS platforms from a single codebase.
0624.1.online-video-cutter.com.mp4
- Cross-Platform Compatibility: Developed with Kotlin Multiplatform Mobile, ensuring a native experience on both Android and iOS from a shared codebase.
- Augmented Reality (AR) Integration: Explore interactive AR features, likely for overlaying digital information or experiences onto the real world.
- Barcode Scanning: Efficiently scan and process various barcode types (e.g., QR codes, UPCs) for data retrieval or product information.
- Modern UI: Utilizes Compose Multiplatform for a declarative, modern, and consistent user interface across all supported platforms.
- Shared Business Logic: Centralized business logic and data models for easier maintenance and development.
- Kotlin Multiplatform Mobile (KMM): For sharing code between Android and iOS.
- Compose Multiplatform: For building native UIs across Android and iOS.
- Android Jetpack Compose: For Android-specific UI components.
- SwiftUI: For iOS-specific entry points and potential platform-specific UI.
- Kotlin: The primary programming language.
To get a local copy up and running, follow these simple steps.
- Android Studio (with Kotlin Multiplatform Mobile plugin)
- Xcode (for iOS development, macOS only)
- JDK 11 or higher
- Clone the repository:
git clone https://github.com/haidrrrry/ArBarCodeProject.git
cd ArBarCodeProject-
Open in Android Studio: Open the
ArBarCodeProjectdirectory in Android Studio. Android Studio will automatically resolve the dependencies. -
Run on Android:
- Select the
androidApprun configuration. - Choose an emulator or a connected Android device.
- Click the 'Run' button (green triangle) in Android Studio.
- Select the
-
Run on iOS:
- Open the
ArBarCodeProjectdirectory in Android Studio. - Select the
iosApprun configuration. - Choose an iOS simulator.
- Click the 'Run' button (green triangle) in Android Studio. Android Studio will build and launch the app in Xcode.
- Alternatively, you can open
iosApp/iosApp.xcodeprojdirectly in Xcode and run from there.
- Open the
The project follows a standard Kotlin Multiplatform Mobile structure:
/composeApp: This module contains the shared logic and UI code that is common across your Compose Multiplatform applications.commonMain: Contains the core business logic, data models, and shared Compose Multiplatform UI components that are used by all targets (Android, iOS).androidMain: Contains Android-specific implementations, dependencies, and theMainActivityfor the Android application.iosMain: Contains iOS-specific implementations, dependencies, and the entry point for the iOS application.
/iosApp: This directory contains the Xcode project for the iOS application. Even when sharing UI with Compose Multiplatform, this is where the iOS application's entry point resides, and where you might add SwiftUI code for platform-specific needs.
- ARCore Integration: Utilizes Google's ARCore for augmented reality experiences
- CameraX: Advanced camera functionality for barcode scanning
- ML Kit: Google's machine learning kit for barcode detection and recognition
- Material Design 3: Modern Android design system implementation
- ARKit Integration: Apple's augmented reality framework for immersive experiences
- AVFoundation: Core camera and media framework for scanning functionality
- Vision Framework: Apple's computer vision framework for barcode detection
- SwiftUI: Native iOS UI components where needed
This application can be utilized in various scenarios:
- Retail & E-commerce: Product scanning for price comparison and information retrieval
- Inventory Management: Quick barcode scanning for stock tracking and management
- Educational: Interactive AR experiences combined with QR code learning materials
- Marketing: AR-enhanced promotional campaigns triggered by barcode scanning
- Logistics: Package tracking and warehouse management solutions
Android - Add to AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" />iOS - Add to Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app needs camera access to scan barcodes and provide AR experiences</string>Android - ARCore metadata in AndroidManifest.xml:
<meta-data android:name="com.google.ar.core" android:value="required" />iOS - ARKit capability in Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app uses AR to enhance barcode scanning experience</string># Run all tests
./gradlew test
# Run Android tests
./gradlew testDebugUnitTest
# Run iOS tests
./gradlew iosSimulatorArm64TestThe project includes:
- Unit tests for shared business logic
- Platform-specific tests for AR and camera functionality
- UI tests for cross-platform components
Contributions are welcome! If you have suggestions for improvements, new features, or bug fixes, please open an issue or submit a pull request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow Kotlin coding conventions
- Write tests for new functionality
- Update documentation as needed
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues:
- Check the Issues page for existing problems
- Create a new issue with:
- Device information (OS version, device model)
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots or logs if applicable
- Kotlin Multiplatform Mobile Documentation
- Compose Multiplatform
- ARCore Documentation
- ARKit Documentation
- ML Kit Barcode Scanning
This project is actively maintained and under development. Check the releases page for the latest updates and version history.
Note: If you appreciate this project, consider starring the repository! β
Made with β€οΈ using Kotlin Multiplatform Mobile