fix: attempt at fixing CSV exports crashing aw-android#532
Open
ErikBjare wants to merge 1 commit into
Open
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #532 +/- ##
=======================================
Coverage 25.55% 25.55%
=======================================
Files 27 27
Lines 1616 1616
Branches 273 273
=======================================
Hits 413 413
Misses 1177 1177
Partials 26 26 ☔ View full report in Codecov by Sentry. |
TimeToBuildBob
added a commit
to TimeToBuildBob/aw-android
that referenced
this pull request
Jul 12, 2026
Adds a JavaScript bridge so the webui can trigger native file downloads on Android. The original download-as-blob approach crashed because the Android WebView cannot initiate system downloads the same way a browser does. Changes: - WebAppInterface: exposes downloadCSV() and downloadJSON() to window.Android - Uses FileProvider (required API 24+) instead of Uri.fromFile(), which throws FileUriExposedException on Android 7.0 and later - Adds res/xml/file_paths.xml for the provider's path config - Declares the FileProvider in AndroidManifest.xml Depends on ActivityWatch/aw-webui#532 (webui side of the bridge). Fixes ActivityWatch#104
ErikBjare
pushed a commit
to ActivityWatch/aw-android
that referenced
this pull request
Jul 12, 2026
…186) * fix: CSV/JSON export via WebAppInterface with FileProvider Adds a JavaScript bridge so the webui can trigger native file downloads on Android. The original download-as-blob approach crashed because the Android WebView cannot initiate system downloads the same way a browser does. Changes: - WebAppInterface: exposes downloadCSV() and downloadJSON() to window.Android - Uses FileProvider (required API 24+) instead of Uri.fromFile(), which throws FileUriExposedException on Android 7.0 and later - Adds res/xml/file_paths.xml for the provider's path config - Declares the FileProvider in AndroidManifest.xml Depends on ActivityWatch/aw-webui#532 (webui side of the bridge). Fixes #104 * fix: harden downloadFile against path traversal, null extDir, write errors, missing viewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Untested.
Depends on: ActivityWatch/aw-android#109