Commit Graph

67 Commits

Author SHA1 Message Date
inventory69
86c5e62fd6 🐛 fix: Fix GitHub workflow build failures
- Fixed compileSdk syntax error in build.gradle.kts (was using incorrect 'compileSdk { version = release(36) }' instead of 'compileSdk = 36')
- Moved splits configuration out of defaultConfig to correct location
- Added comprehensive ProGuard rules to handle OkHttp's optional dependencies (BouncyCastle, Conscrypt, OpenJSSE)
- Added ProGuard rules for Sardine WebDAV, Coroutines, and Gson
- Build now completes successfully both locally and in CI/CD
2025-12-21 11:30:34 +01:00
inventory69
8bc4828246 🐛 fix: Exclude xpp3 from sardine-android to fix R8 XmlPullParser conflict 2025-12-21 11:18:16 +01:00
inventory69
a9c7596e98 🐛 fix: Add missing imports to build.gradle.kts for GitHub Actions
- Import java.util.Properties and java.io.FileInputStream
- Fix Gradle Kotlin DSL compilation errors
- Use getProperty() instead of casting to avoid warnings
2025-12-21 11:13:10 +01:00
inventory69
7e277e7fb9 🚀 feat: Production release preparation with GitHub Actions deployment
## Major Features
-  Battery optimized auto-sync (30 min interval, ~0.4%/day)
-  BuildConfig.DEBUG conditional logging (Logger.kt)
-  Settings UI cleanup (SSID field removed)
-  Interactive notifications (click opens app)
-  Post-reboot auto-sync (BootReceiver)
-  GitHub Actions deployment workflow

## Implementation Details

### Auto-Sync Architecture
- WorkManager PeriodicWorkRequest (30 min intervals)
- Gateway IP detection via network interface enumeration
- Smart sync only when on home network
- BootReceiver restarts monitoring after device reboot

### Logging System
- Logger.kt object with BuildConfig.DEBUG checks
- Debug logs only in DEBUG builds
- Error/warning logs always visible
- All components updated (NetworkMonitor, SyncWorker, WebDavSyncService, etc.)

### UI Improvements
- Removed confusing SSID field from Settings
- Gateway detection fully automatic
- Material Design 3 info boxes
- Cleaner, simpler user interface

### Notifications
- PendingIntent opens MainActivity on click
- setAutoCancel(true) for auto-dismiss
- Broadcast receiver for UI refresh on sync

### GitHub Actions
- Automated APK builds on push to main
- Signed releases with proper keystore
- 3 APK variants (universal, arm64-v8a, armeabi-v7a)
- Semantic versioning: YYYY.MM.DD + build number
- Comprehensive release notes with installation guide

## Documentation
- README.md: User-friendly German guide
- DOCS.md: Technical architecture documentation
- GITHUB_ACTIONS_SETUP.md: Deployment setup guide

## Build Configuration
- Signing support via key.properties
- APK splits for smaller downloads
- ProGuard enabled with resource shrinking
- BuildConfig generation for DEBUG flag
2025-12-21 11:09:29 +01:00
inventory69
933646f28b Fix: Add missing permissions and runtime permission handling for auto-sync
Critical fixes for SSID detection on Android 12+:
- Add CHANGE_WIFI_STATE permission (NetworkCallback registration)
- Add ACCESS_BACKGROUND_LOCATION permission (SSID access)
- Add FOREGROUND_SERVICE_DATA_SYNC permission

SettingsActivity improvements:
- Add checkBackgroundLocationPermission() method
- Show dialog explaining need for 'Always allow' location
- Request permission with proper callbacks
- Better user feedback for permission grants/denials

NetworkMonitor improvements:
- Add initial WiFi check in startMonitoring()
- Add NET_CAPABILITY_INTERNET to NetworkRequest
- Better error handling for '<unknown ssid>' cases
- Log warning about missing BACKGROUND_LOCATION permission

This should fix the root cause: SSID was showing as '<unknown ssid>'
because app lacked background location permission on Android 16.
User must select 'Always allow' when prompted for location permission.
2025-12-20 21:30:56 +01:00
inventory69
980343866f Add Application-level NetworkMonitor with extensive logging
- Create SimpleNotesApplication class for app-level lifecycle
- Move NetworkMonitor from Activity to Application context
- Add comprehensive logging to NetworkMonitor (all callbacks)
- Add logging to SyncWorker for debugging
- Remove NetworkMonitor from MainActivity (now in Application)
- Add Battery Optimization dialog in SettingsActivity
- Improve Notifications (showSyncInProgress, showSyncSuccess, showSyncError)

This should fix background sync issues - NetworkMonitor now runs
with Application context instead of Activity context, which should
survive when app is in background.

Debug with: adb logcat | grep -E 'NetworkMonitor|SyncWorker|SimpleNotesApp'
2025-12-20 17:19:45 +01:00
inventory69
4eb8a006dd Fix WLAN SSID detection - add location permission
- Add ACCESS_FINE_LOCATION permission (required for SSID on Android 10+)
- Request permission at runtime when detecting SSID
- Handle permission result and retry detection
2025-12-20 01:43:02 +01:00
inventory69
3600a30834 Fix: Separate connection test from sync
- Add testConnection() method that only tests connectivity
- Connection test no longer syncs notes automatically
- Only 'Sync Now' button triggers actual synchronization
2025-12-20 01:19:41 +01:00
inventory69
5aeb219ab0 Fix edge-to-edge layout issues - add fitsSystemWindows to all layouts
Prevents content from rendering under status bar
2025-12-20 01:13:48 +01:00
inventory69
61ff005477 Fix toolbar issues: setSupportActionBar in Editor and Settings
- Add toolbar setup in NoteEditorActivity
- Add toolbar setup in SettingsActivity
- Add toolbar to activity_settings.xml layout
- Fix back button and menu display issues
2025-12-20 01:12:44 +01:00
inventory69
0ef50d5d5a Add missing activities to AndroidManifest (NoteEditorActivity, SettingsActivity, WifiSyncReceiver) 2025-12-20 01:07:45 +01:00
inventory69
f80791b91f Fix Sardine put() method - use ByteArray instead of InputStream 2025-12-20 01:03:49 +01:00
inventory69
c29542567f Implement complete Android app code
- Add models: Note, SyncStatus
- Add storage: NotesStorage for local file system
- Add sync: WebDavSyncService, SyncWorker, WifiSyncReceiver
- Add UI: MainActivity, NoteEditorActivity, SettingsActivity
- Add adapters: NotesAdapter
- Add utils: Constants, DeviceIdGenerator, Extensions, NotificationHelper
- Add layouts: activity_main, activity_editor, activity_settings, item_note
- Add menus and strings
2025-12-20 00:59:16 +01:00
inventory69
20af8b6e36 Add Android project dependencies and permissions 2025-12-20 00:47:47 +01:00
inventory69
12ff12f161 Update documentation links
All detailed documentation moved to project-docs repository
2025-12-19 23:57:09 +01:00
inventory69
5da4d73059 Add Quick Start Guide
- Complete setup instructions for Android Studio
- Server testing commands
- Current server IP (192.168.0.188:8080)
- Troubleshooting section
- Links to all documentation
2025-12-19 23:45:18 +01:00
inventory69
083fd94714 Initial commit: Simple Notes Sync project setup
Features:
- Docker WebDAV server with docker-compose
- Server configuration with .env
- Project structure for Android app
- Complete documentation references
- MIT License

Server:
- bytemark/webdav Docker image
- Basic authentication
- Port 8080 exposed
- Volume mounts for data and logs
- Quick start README

Android:
- Project structure defined
- README with setup instructions
- Links to complete implementation guide

Status: Server running and tested ✓
Next: Android app implementation in Android Studio
2025-12-19 23:44:05 +01:00