The QR Code Scanner App is a powerful Android application that allows users to:
- Generate QR codes dynamically based on input.
- Customize QR code colors.
- Save, share, and print generated QR codes.
- Pair and unpair with Bluetooth printers for seamless printing.
✅ QR Code Generation
- Automatically generates QR codes based on user input.
- Supports real-time generation and updates when text changes.
🎨 Color Customization
- Choose custom colors for the QR code using a color picker.
📸 Save & Share
- Save generated QR codes to the device’s storage.
- Share QR codes via different platforms (Email, Messaging, etc.).
🖨️ Print to Bluetooth Printer
- Connect and print QR codes directly to paired Bluetooth printers.
- Supports unpairing and re-pairing of devices.
💾 Dynamic Size Adjustment
- Resize QR codes dynamically based on user input.
- Clone the Repository:
git clone https://github.com/potatoscript/QRCodeScannerApp.git- Open Project in Android Studio:
- Open
Android Studio. - Select
Open an existing projectand navigate to the cloned repository.
- Build & Run the Project:
- Connect an Android device or start an emulator.
- Click on
Run(▶️ ) to build and launch the app.
- Enter text in the input field.
- The QR code is generated automatically.
- Click on the
Change Colorbutton. - Select a custom color from the color picker.
- Click the save button to store the QR code as an image.
- Click the share button to send the image using available apps.
- Pair the app with a Bluetooth printer.
- Send the QR code directly to the paired printer.
/QRCodeScannerApp
├── /app
│ ├── /src
│ │ ├── /main
│ │ │ ├── /java/com/potato/barcodescanner
│ │ │ │ ├── MainActivity.java // Main activity with menu options
│ │ │ │ ├── QRcodeActivity.java // Handles QR code generation
│ │ │ │ ├── ColorPickerActivity.java // Color selection logic
│ │ │ │ └── /utils
│ │ │ │ └── QRCodeUtils.java // QR code utility methods
│ │ │ ├── /res
│ │ │ │ ├── /layout
│ │ │ │ ├── /drawable
│ │ │ │ └── /values
│ │ └── /AndroidManifest.xml // App configuration and permissions
├── /gradle
└── build.gradle
The following permissions are required:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>Add the following dependencies in your app/build.gradle:
dependencies {
implementation 'com.google.zxing:core:3.4.1' // QR Code generation
implementation 'com.journeyapps:zxing-android-embedded:4.3.0' // Barcode scanning
implementation 'com.github.mazenrashed:Printooth:1.0.6' // Bluetooth printing
implementation 'com.squareup.picasso:picasso:2.71828' // Image loading and caching
}To enable Bluetooth printing:
- Enable Bluetooth on your device.
- Pair with a compatible Bluetooth printer.
- Use the pairing option in the app to connect to the printer.
- Open
ColorPickerActivity.javato modify the default color. - Adjust
r,g, andbvalues to set custom colors.
-
Bluetooth Printer Not Found:
- Ensure Bluetooth is enabled and the printer is in pairing mode.
-
QR Code Not Generating:
- Verify that text input is not empty.
-
Permission Denied Errors:
- Ensure that necessary permissions are granted in
AndroidManifest.xml.
- Ensure that necessary permissions are granted in
✅ Support for Barcode Generation
✅ Add QR Code History
✅ Improve UI/UX with Material Design
✅ Implement Dark Mode
This project is licensed under the MIT License. See the LICENSE file for details.
💡 Developed by PotatoScript
📧 For inquiries, email: contact@potatoscript.dev