Current Implementation
The app includes a Floating Action Button (FAB) for the QR scanner on the Home Screen:HomeScreen.kt:42-54
Visual Design
Button Styling
- Background: TecGold (brand accent color)
- Icon: TecBlue QR scanner icon
- Position: Bottom-right corner as floating action button
Icon
Uses Material Icons’
QrCodeScanner icon to clearly indicate the button’s purposeCurrent State
The FAB is visible on the Home Screen but has no functionality:- onClick: Empty handler (no action)
- Visual: Fully styled and positioned
- Accessibility: Content description “Escanear QR” (Scan QR)
Intended Functionality
When implemented, the QR Attendance feature will:1. QR Code Scanner
Camera Integration
Open the device camera with a QR code scanner overlay when the FAB is tapped
2. Attendance Registration
Scan & Verify
- Scan QR code displayed by professor
- Verify class session and time
- Validate student enrollment
Record Attendance
- Submit attendance record to backend
- Display confirmation message
- Update attendance status in app
3. Use Cases
Class Check-in
Students scan a QR code when entering the classroom to mark attendance
Professor Display
Professors display a unique QR code for each class session
Time-Limited
QR codes expire after a certain time to prevent fraudulent check-ins
Technical Implementation Plan
To implement this feature, the following components would be needed:Required Permissions
AndroidManifest.xml
QR Code Scanner Library
Potential libraries to integrate:ML Kit Barcode Scanning
Google’s ML Kit provides built-in barcode/QR scanning with good performance
ZXing
Popular open-source library for QR code scanning and generation
Data Model
A potentialAttendanceRecord data class:
UI Flow
Backend Integration
User Experience Design
Scanner Overlay
The QR scanner should include:- Camera preview: Full-screen camera view
- Scanning frame: White or gold square indicating scan area
- Instructions: “Position QR code within frame”
- Close button: X button to dismiss scanner
- Flashlight toggle: For scanning in low light
Success State
Error States
Invalid QR Code
“This QR code is not valid for attendance.”
Expired Code
“This QR code has expired. Please ask your professor for a new one.”
Wrong Class
“This QR code is for a different class or time.”
Already Recorded
“You’ve already recorded attendance for this class.”
Security Considerations
Time Validation
QR codes should only be valid during class time, with a small buffer before/after
Encryption
QR code data should be encrypted to prevent forgery
One-Time Use
QR codes should rotate periodically during class to prevent sharing
Location Check
Optional: Verify student is within campus geofence
Attendance History
The feature could also include an attendance history view:Implementation Priority
Alternative Attendance Methods
Beyond QR codes, the system could support:NFC
Tap phone to NFC reader in classroom
Geofence
Automatic check-in when entering classroom geofence
Bluetooth
Proximity detection with classroom Bluetooth beacons
Benefits
Fast Check-in
Students can mark attendance in seconds without manual roll call
Accurate Records
Eliminates manual errors and provides timestamped records
Student Visibility
Students can track their own attendance in real-time
Analytics
Provides data for attendance patterns and engagement analysis
Related Features
Home Screen
The QR scanner FAB is located on the Home Screen
Schedule
Attendance could be integrated into the schedule view
Student Profile
Attendance statistics could be displayed in the profile
