Add common file types registration mode (fixes #374)#406
Conversation
Co-authored-by: TomTasche <128734+TomTasche@users.noreply.github.com>
Co-authored-by: TomTasche <128734+TomTasche@users.noreply.github.com>
|
the catch-all mode should remain as-is! however, once the option for catch-all is disabled, we should only register for well-supported types like OpenDocument (odt, ods, odp, etc), Word (doc) and PDF |
Co-authored-by: TomTasche <128734+TomTasche@users.noreply.github.com>
Updated COMMON_TYPES to support only well-supported formats as requested: ✅ PDF (application/pdf, *.pdf) The catch-all mode remains unchanged and available for compatibility. Commit: cbfad52 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
I'm still seeing three modes in the code. I believe we only need two: catch-all and catch-supported. also, why did you have to modify the AndroidManifest? I'd expect you only enable / disable the appropriate intent filters based on the current mode |
Co-authored-by: TomTasche <128734+TomTasche@users.noreply.github.com>
Simplified to exactly two modes as requested:
Removed COMMON_TYPES alias entirely and reverted to simple two-component toggle logic. No unnecessary AndroidManifest changes. ac96894 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| analyticsManager.report(isCatchAllEnabled ? "catch_all_enabled" : "catch_all_disabled"); | ||
| } | ||
|
|
||
|
|
| </intent-filter> | ||
| </activity-alias> | ||
|
|
||
|
|
| <string name="landing_intro_search">With OpenDocument Reader you can read and search through your documents in a breeze.</string> | ||
| <string name="landing_intro_edit">Found one last typo left to fix ahead of your big presentation? It now supports modifications too!</string> | ||
| <string name="landing_intro_open_all">This app registers to open all file types by default in order to support apps like \"Samsung My Files\". You may turn this feature off here if it causes problems for you.</string> | ||
| <string name="landing_intro_open_all">Enable opening common file types (PDF, DOCX, PPTX, ODT, etc.) from other apps. Turn off to only handle OpenDocument formats.</string> |
Co-authored-by: TomTasche <128734+TomTasche@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
I trust Claude Code more: #412 |
Implements a middle ground between "catch all" and "strict" file type registration to address user complaints about unwanted file association prompts while maintaining functionality for common document types.
Problem
Issue #374 reported that the binary choice between registering for ALL file types vs OpenDocument-only was problematic:
*/*causing the app to appear for unrelated files (APKs, contacts, etc.)Users wanted a middle ground to handle common document types (PDF, DOCX, PPTX) without the annoyance of irrelevant file associations.
Solution
Added a new
COMMON_TYPESregistration mode that targets specific document formats:Supported File Types
application/pdf,*.pdfImplementation Details
MainActivity.COMMON_TYPESin AndroidManifest.xml with targeted intent filtersMainActivity.javato manage three modes instead of twoUser Experience
Catch AllTesting
Benefits
✅ Addresses core issue: No more unwanted prompts for APKs, contacts, etc.
✅ Maintains functionality: PDFs and Office docs still open from messaging apps
✅ Better defaults: New users get reasonable behavior out of the box
✅ Smooth migration: Existing users automatically get improved experience
✅ Backward compatible: All existing functionality preserved
Closes #374
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx1536M -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/gradle-daemon-main-8.9.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/agents/gradle-instrumentation-agent-8.9.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.9(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.