Tapping a downloaded file skips the configured Direct Editing editor (e.g. PDF opens in an external app instead)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with OCFileListFragment.onFileClicked() and compare its downloaded and not-downloaded paths, especially the existing hasTextEditor(file) check. Check FileDisplayActivity.previewFile() and FileActionHandler.edit() to understand the current preview and editor behavior. Done means tapping a downloaded file opens its configured Direct Editing editor when available, while offline preview remains a fallback.
Written by the indexing model from the issue text.
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
What happens when I tap a file depends on whether it is already downloaded to the device:
- Not downloaded: if a Direct Editing editor lists the file's mimetype as supported, the app opens that editor in its web view (
OCFileListFragment.openFile(),hasTextEditor()branch). - Downloaded:
onFileClicked()goes topreviewFile()instead and never checks for an editor. For PDFs,previewFile()callsstartPdfPreview(), which prefers third party PDF apps, so the file opens in the system PDF viewer.
So the same tap on the same file opens the server's editor the first time and an external app once the file is cached. My use case: a server app that registers a Direct Editing editor for application/pdf (annotating construction plans). On a tablet, the editor opens fine until the file has been downloaded once; after that, tapping it opens the external PDF viewer. Edit in the file menu still opens the editor (FileActionHandler.edit()), but tapping is what users do.
Reading the code, the same seems to apply to other editors, e.g. a downloaded Markdown file would go to the internal text preview instead of the Text app's editor. I have only observed the PDF case.
Describe the solution you'd like
When a Direct Editing editor lists the mimetype in its (non-optional) mimetypes, tapping a file opens that editor whether or not the file is downloaded. In code: apply the same webViewAvailable && hasTextEditor(file) && !file.isEncrypted check in onFileClicked() before the file.isDown branch (or at the start of previewFile()). Offline, the current preview could stay as the fallback.
Describe alternatives you've considered
- Using Edit from the file menu every time: works, but is not discoverable and differs from the non-downloaded case.
- Uninstalling or changing the default PDF app on the device: then the internal PDF preview opens, still not the editor.
- A setting "Open files with the server editor when available": would also work, but the consistent behaviour above seems simpler.
Additional context
- Observed on a live instance: Nextcloud server 35.0.3, Nextcloud Android app , , Android .
- The editor is registered via
RegisterDirectEditorEventand appears in/ocs/v2.php/apps/files/api/v1/directEditingwithapplication/pdfinmimetypes.
Assisted by ClaudeCode:claude-opus-5-5
- Dominant language
- Kotlin
- Stars
- 5.7k
- Forks
- 2.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 149
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/android
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nextcloud/android#18094 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
nextcloud/android#17845 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the appMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nextcloud/android#17837 · 2 reactions ·
Maintainers usually reply within 1 day
-
0. Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nextcloud/android#17533 · 1 comment ·
Maintainers usually reply within 1 day
-
RC 34.1.0-01: Duplicated wording in creation menu — "New" prefix + creator name produces "New New document" ("Neu Neues Dokument")Possibly taken @ChristianTannheimer claimed this 129 days ago. Open0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
All issues in nextcloud/android
Similar issues
-
accessibility agent-ready area:android bug fleet
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
level-98/mailcrane#412 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DojoCodingLabs/hermit#23 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
signalapp/Signal-Android#15148 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day