- AnalyticsEvent: Data class for tracked events
- AnalyticsDao: Room DAO with CRUD operations
- AnalyticsDatabase: Room database singleton
- AnalyticsManager: High-level API for logging events
- Unit tests for AnalyticsEvent
Event types: page_view, session_start, session_end,
idle_reset, admin_access, config_sync, signage_rotate
Supports JSON/CSV export for admin panel integration.
- SignageManager.kt: Handles URL rotation with configurable interval
- Admin UI: Toggle, URL list (one per line), interval setting
- SignageManagerTest.kt: 9 unit tests for rotation logic
Features:
- Enable/disable signage mode
- Configure list of URLs to rotate
- Set rotation interval (min 5 seconds)
- Pauses on user interaction (resumes after 1 min)
- Resets to first URL on idle timeout
Note: MainActivity integration pending
Security improvement: PINs are now stored as salted SHA-256 hashes
instead of plain text.
- PinSecurity.kt: Hash/verify utilities with salt
- AdminActivity: Uses hashed PINs for storage and verification
- Backward compatible: verifies against legacy plain text PINs
- PIN field shows placeholder when hashed (enter new to change)
- PinSecurityTest.kt: Unit tests for hashing logic
Format: 'base64salt:base64hash' stored in DataStore
XML onClick handlers require a View parameter. Missing parameter
was causing crash when triple-tapping admin area.
Fixes admin settings access crash on tap.
- ProgressBar in activity_main.xml (top of screen)
- LoadingProgress.kt utility with WebChromeClient
- Shows during page load, hides on complete
- Smooth UX with slight hide delay
Integration: webView.setupProgressBar(binding.progressBar)
- error.html: User-friendly error page with retry button
- ErrorHandler.kt: Utility for handling WebView errors
- ErrorHandlerTest.kt: Unit tests for error handling
Shows friendly error page on network failures instead of blank/broken page.
Includes error code display and one-tap retry.
- Build and test on push/PR to main
- Run unit tests
- Build debug APK
- Run Android lint (non-blocking)
- Upload artifacts (APK + lint reports)
Note: Requires gradle wrapper to be generated with 'gradle wrapper'
Comprehensive test cases for:
- Core functionality (fullscreen, webview, whitelist)
- Admin access and settings
- Idle timeout behavior
- Boot persistence
- Edge cases and security tests
Created by Margaret 🌸
Co-authored-by: Margaret <margaret@hobbs.farm>