## Quagga2 Scanner - Reader-Reihenfolge optimiert: CODE128/CODE39 vor EAN - Verhindert Fehlerkennungen bei alphanumerischen Codes (z.B. P20260030) - EAN-Reader haben niedrigere Priorität ## Brother PT-E560BT Android App - Native Kotlin App für Bluetooth-Druck auf Brother PT-E560BT - Intent-Schema: brotherprint://print?barcode=XXX&ref=REF - 90° Rotation für Längs-Druck auf 24mm TZe-Band - Produkt-Referenz (fett), Barcode-Strichen, Barcode-Wert - Erweiterte Error-Handling (SetLabelsizeError, NoCoverError, etc.) - Build: Gradle 9.3.1, Kotlin 2.1.0, Brother SDK v4 ## Bestelllogik - ref_supplier = "Direkt" (ohne Datum) für dauerhafte Direktbestellungen - Pro Lieferant eine durchgängige Direkt-Bestellung statt tägliche neue ## PWA Updates - Service Worker v8.1 - CSS/JS Cache-Invalidierung (?v=81) - localStorage Migration für alte Keys ## Dokumentation - README.md aktualisiert mit Brother-App und PWA-Details - Dateistruktur erweitert um android-app/ - .gitignore für Test-Dateien Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gradle | ||
| app | ||
| build/reports/problems | ||
| gradle/wrapper | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| local.properties | ||
| README.md | ||
| settings.gradle.kts | ||
BrotherPrintHelper - Native Android App
Native Android App zum Drucken von Barcodes auf Brother P-touch E560BT über Bluetooth.
Projekt-Setup
1. Android Studio Projekt erstellen
- Android Studio öffnen
- New Project → Empty Activity
- Einstellungen:
- Name:
BrotherPrintHelper - Package name:
de.data_it_solution.brotherprinthelper - Save location: Beliebig
- Language: Kotlin
- Minimum SDK: API 24 (Android 7.0) oder höher
- Build configuration language: Kotlin DSL (build.gradle.kts)
- Name:
2. Brother SDK herunterladen
- Brother Developer Portal: https://developerprogram.brother-usa.com/sdk-download
- Android Mobile SDK herunterladen (neueste Version)
- SDK entpacken
3. Brother SDK integrieren
Option A: AAR-Datei (empfohlen):
- SDK-AAR-Datei in
app/libs/kopieren - In
app/build.gradle.ktseinfügen:
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar"))))
// ... andere dependencies
}
Option B: Maven (falls verfügbar):
dependencies {
implementation("com.brother.sdk:brotherprintsdk:4.+")
}
4. Dateien aus diesem Verzeichnis übernehmen
Kopiere folgende Dateien in dein Android Studio Projekt:
AndroidManifest.xml→app/src/main/AndroidManifest.xml(merge mit bestehendem)MainActivity.kt→app/src/main/java/de/data_it_solution/brotherprinthelper/MainActivity.ktbuild.gradle.kts→app/build.gradle.kts(merge Dependencies)
5. Projekt kompilieren
./gradlew assembleDebug
6. APK installieren
Über USB:
adb install app/build/outputs/apk/debug/app-debug.apk
Über Android Studio:
- Run → Run 'app'
Verwendung
Von HandyBarcodeScanner PWA aufrufen
// In scanner.js oder barcode_print.js
function openBrotherPrintApp(barcodeValue) {
const intent = `intent://print?barcode=${encodeURIComponent(barcodeValue)}#Intent;` +
`scheme=brotherprint;` +
`package=de.data_it_solution.brotherprinthelper;` +
`end`;
window.location.href = intent;
}
// Beispiel-Aufruf
openBrotherPrintApp('1234567890');
Workflow
- User scannt Barcode in HandyBarcodeScanner PWA
- PWA ruft
openBrotherPrintApp()auf - BrotherPrintHelper App öffnet sich
- App verbindet sich mit Brother P-touch E560BT
- Druckt Barcode auf 24mm Label
- Kehrt automatisch zur PWA zurück
Drucker-Konfiguration
Die App ist vorkonfiguriert für:
- Drucker: Brother P-touch E560BT
- Label-Breite: 24mm
- Barcode-Format: CODE128
- Verbindung: Bluetooth
Anpassungen in MainActivity.kt:
val labelSize = QLPrintSettings.LabelSize.W24
val printerModel = QL_820NWB // Ggf. anpassen
Troubleshooting
App startet nicht
- Bluetooth-Permissions in AndroidManifest.xml vorhanden?
- Brother SDK korrekt in libs/ integriert?
Drucker nicht gefunden
- Drucker in Android Bluetooth-Settings gepaart?
- Drucker eingeschaltet und in Reichweite?
- Brother SDK unterstützt dieses Modell?
Druck schlägt fehl
- Label eingelegt? (24mm Breite)
- Drucker-Status OK? (keine Fehler-LED)
- Template-ID korrekt?
Entwickler-Info
Autor: Eduard Wisch (data@data-it-solution.de) Lizenz: Proprietär Version: 1.0.0 Brother SDK Version: 4.x Min Android: API 24 (Android 7.0) Target Android: API 34 (Android 14)
Links
- Brother Developer Portal: https://developerprogram.brother-usa.com/
- Brother SDK Doku: https://support.brother.com/g/s/es/htmldoc/mobilesdk/
- HandyBarcodeScanner: https://git.data-it-solution.de/data/dolibarr.handybarcodescanner