$ show SecUSo/privacy-friendly-qr-scanner
This is a privacy-focused Android application for scanning and generating QR codes and barcodes, developed by the SECUSO research group (Security, Usability, Society) at TU Darmstadt. The app uses the device camera to decode codes, supports image picker scanning, and provides a QR code generator for various content types (URL, text, email, phone, SMS, WiFi, vCard, MeCard, BizCard, geo-location, product, calendar, etc.). It emphasizes minimal permissions (only camera, no internet required for scanning) and includes phishing protection by highlighting domains and requiring user confirmation before opening links. The architecture follows standard Android patterns: Activities with ViewModel + LiveData, Room database for scan history, Repository pattern, and a navigation drawer for main sections (Scanner, Generator, History, Settings, Help, About). The codebase is a mix of Java and Kotlin, uses AndroidX, Material Design, ZXing for barcode decoding, and Glide for image loading. It also integrates a backup service via a git submodule (privacy-friendly-backup-api). The app is part of the Privacy Friendly Apps suite and is licensed under GPLv3.
The LLM identified 4 files worth highlighting for reuse:
A self-contained Kotlin class that listens for keyboard visibility changes by observing the root view's insets and adjusts a FloatingActionButton's translationY accordingly. It uses Android's ViewCompat.setOnApplyWindowInsetsListener and is parameterized with the FAB and root view. This pattern is reusable in any Android app that needs to move a FAB above the keyboard without complex layout changes.
A utility class that opens a search engine dialog (DuckDuckGo, Google, Startpage, Brave, or custom URI) with a given query. It builds an Intent with ACTION_VIEW and the search URI, and handles the case where no browser is available. The search engines are defined as an enum with URIs and display names. This component is reusable in any Android app that needs to offer configurable web search functionality.
A utility class that builds ContentValues for inserting a contact into the Android ContactsContract provider. It handles name, phone, email, address, organization, and other fields. The class is self-contained and uses only Android SDK APIs. This pattern is reusable in any Android app that needs to programmatically add contacts.
A utility class that provides methods for caching generated QR code bitmaps, sharing them via Intent, saving to the device gallery, and generating dot-style QR codes. It uses Android's MediaStore and FileProvider for saving, and handles permission checks. This component is reusable in any Android app that needs to manage generated images (caching, sharing, saving).