sweakpl / qralarm-android

QRAlarm is an Android alarm clock application that lets the user turn off alarms by scanning the QR Code.
GNU General Public License v3.0
112 stars 10 forks source link

Feature request: barcode support #17

Closed domportera closed 1 year ago

domportera commented 1 year ago

It would be nice to be able to use normal barcodes as well as QR codes. It's hard to use this app on the go when you may not have a QR code on hand, or no printer at home to print one out. It would be nice to just be able to scan any household object.

This repository implements a barcode scanner if that's of any help.

Thanks!

domportera commented 1 year ago

actually, i did it myself and it was very simple. it seems like a very intentional decision not to support this, so I can just keep my own fork. but for anyone curious, this is how it's done:

in app/src/main/java/com/sweak/qralarm/ui/screens/scanner.ScannerScreen.kt line 66:

change formats = listOf(BarcodeFormat.QR_Code) to formats = CodeScanner.ALL_FORMATS