feat: Add REST API and Web UI for remote time tracking #373
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📱 What does this PR do?
Adds a local REST API server and web interface that allows users to track time from their computer browser while keeping data synced with the Android app in real-time.
This addresses the sync and web UI feature request from issue #103.
🎥 A screen recording that show the feature
✨ Features Added
REST API Server
WearCommunicationAPI) - zero duplicate codeWeb Interface
🔧 Technical Implementation
API Endpoints
Files Added/Modified
New files:
app/src/play/java/.../api/WebApiAdapter.kt- REST API implementationapp/src/play/java/.../api/WebApiModule.kt- Dependency injectionweb/index.html- Sample of WebApp (we just use API)Modified files:
app/src/main/java/.../TimeTrackerApp.kt- Start API server on app launchapp/src/main/AndroidManifest.xml- Add INTERNET permission🎯 Why This Approach?
WearCommunicationAPI- no duplicate business logicplayflavor, doesn't affectbase(F-Droid) build📝 Usage
web/index.htmlin browser on computerhttp://[phone-ip]:8080and click "Connect"🔒 Security Considerations
🐛 Known Limitations
playflavor (depends on Google Play Services components)