Skip to content

Add native Android barcode scanner app for Datalogic terminals#5

Draft
Copilot wants to merge 8 commits intomasterfrom
copilot/create-barcode-scanner-app
Draft

Add native Android barcode scanner app for Datalogic terminals#5
Copilot wants to merge 8 commits intomasterfrom
copilot/create-barcode-scanner-app

Conversation

Copy link

Copilot AI commented Jan 12, 2026

Implements a native Android application for Datalogic terminals to scan barcodes, collect quantities, and export data to text files in the Download folder.

Implementation

Core Functionality

  • MainActivity.java: Implements ReadListener for Datalogic SDK barcode scan events
  • Quantity input field with numeric validation (defaults to 1 on invalid input)
  • In-memory collection of scan entries (barcode + quantity pairs)
  • Export to tab-separated text files with timestamp-based naming

Storage Strategy

  • Android 10+ (API 29+): App-specific external storage (getExternalFilesDir()) - no permissions required
  • Android 5-9 (API 21-28): Public Downloads directory - requests WRITE_EXTERNAL_STORAGE

UI Components

  • Quantity input (EditText with number validation)
  • Real-time scan list (ScrollView with TextView)
  • Save and Clear action buttons

Android Studio Compatibility

The project is fully compatible with Android Studio and uses modern Gradle configuration:

  • Project Location: Open the android-app/ folder in Android Studio
  • Gradle: Modern plugin DSL syntax with Android Gradle Plugin 8.0.2 and Gradle 8.0
  • Setup Guide: Comprehensive ANDROID_STUDIO_GUIDE.md included with step-by-step instructions
  • Template: local.properties.example for SDK path configuration

File Structure

android-app/                          ← Open this folder in Android Studio
├── app/src/main/
│   ├── java/com/datalogic/barcodescanner/MainActivity.java
│   ├── res/layout/activity_main.xml
│   └── AndroidManifest.xml
├── build.gradle (Modern plugin syntax)
├── settings.gradle (pluginManagement + dependencyResolutionManagement)
├── ANDROID_STUDIO_GUIDE.md (Setup instructions)
├── README.md (Technical docs)
└── QUICK_START.md (IT/EN user guide)

Output Format

Barcode Scan Report
Generated: 2026-01-12 14:30:22
=====================================

1234567890123	5
9876543210987	2

=====================================
Total items: 2

Note: Requires Datalogic SDK (pre-installed on Datalogic devices) for barcode scanning functionality. Build configuration uses compileOnly dependency since SDK is provided at runtime by device firmware.

Original prompt

facciamo un brainstorm con le skill che hai, per creare una app mobile android per terminali datalogic. l'app deve raccoglire in un file di testo nella cartella Download sul device una

sequenza di codici e quantità leggendo i codici a barre utilizzando lo scanengine integrato


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits January 12, 2026 11:01
Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
… handle Android 10+ storage

Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
…vior

Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement barcode scanning for data collection Add native Android barcode scanner app for Datalogic terminals Jan 12, 2026
Copilot AI requested a review from flandi January 12, 2026 11:10
@flandi
Copy link
Collaborator

flandi commented Jan 12, 2026

@copilot where do I find the projct files? Can you convert to be compiled in Android Studio?

Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 12, 2026

@copilot where do I find the projct files? Can you convert to be compiled in Android Studio?

The project files are in the android-app/ directory. The project is now fully compatible with Android Studio.

To open in Android Studio:

  1. Launch Android Studio
  2. Click "Open" and select the android-app folder
  3. Android Studio will automatically detect and sync the Gradle project

I've added a comprehensive Android Studio Setup Guide with detailed instructions including:

  • How to locate and open the project
  • First-time setup steps
  • Adding the Datalogic SDK
  • Building and running on a device
  • Troubleshooting common issues

The Gradle configuration has been modernized to use the latest plugin syntax for better Android Studio compatibility.

Commit: fbeb370

Co-authored-by: flandi <6390322+flandi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants