owncloud / owncloud/android

[BUG] Deep links over shared files (oCIS)

Open
#4,250 6 comments 0 reactions 1 assignee View on GitHub

@JuancaG05 is already working on this.

Since Dec 18, 2023.

  • #4302 by @JuancaG05 — closed without merging
Estimation - 5 (L) Share with users
Dominant language
Kotlin
Stars
4.2k
Forks
3.1k
Avg merge
1d 12h
Merged PRs (30d)
7

Description

Comes from https://github.com/owncloud/android/pull/4212#issuecomment-1840841042

Deep links over shared files are not implemented. It's causing a crash:

                                                                                                    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.owncloud.android/com.owncloud.android.ui.activity.FileDisplayActivity}: java.net.URISyntaxException: Illegal character in path at index 227: owncloud://ocis.ocis-wopi.latest.owncloud.works/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668%2142117dc5-c175-49a3-a683-4827bd3fe444:4374bf79-85db-4821-948e-4ca06a32726b:db2f83b4-0c8f-4c2e-8539-7b2
                                                                                                    11458f7d6
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
                                                                                                    	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
                                                                                                    	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loop(Looper.java:223)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
                                                                                                    Caused by: java.net.URISyntaxException: Illegal character in path at index 227: owncloud://ocis.ocis-wopi.latest.owncloud.works/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668%2142117dc5-c175-49a3-a683-4827bd3fe444:4374bf79-85db-4821-948e-4ca06a32726b:db2f83b4-0c8f-4c2e-8539-7b2
                                                                                                    11458f7d6
                                                                                                    	at java.net.URI$Parser.fail(URI.java:2893)
                                                                                                    	at java.net.URI$Parser.checkChars(URI.java:3066)
                                                                                                    	at java.net.URI$Parser.parseHierarchical(URI.java:3150)
                                                                                                    	at java.net.URI$Parser.parse(URI.java:3098)
                                                                                                    	at java.net.URI.<init>(URI.java:584)
                                                                                                    	at com.owncloud.android.presentation.files.operations.FileOperationsViewModel.handleDeepLink(FileOperationsViewModel.kt:145)
                                                                                                    	at com.owncloud.android.ui.activity.FileDisplayActivity.handleDeepLink(FileDisplayActivity.kt:1777)
                                                                                                    	at com.owncloud.android.ui.activity.FileDisplayActivity.onCreate(FileDisplayActivity.kt:193)
                                                                                                    	at android.app.Activity.performCreate(Activity.java:8000)
                                                                                                    	at android.app.Activity.performCreate(Activity.java:7984)
                                                                                                    	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)

apart of avoiding the crash, app should resolve the link using the meta endpoint (guessing that item is reachable) and show it as any other item in the Shares tab.

TASKS
  • Research (if needed)
  • Create branch fix/deep_links_for_shares
  • Development tasks
    • Discover root folder of the shares space in first account discovery
    • Check if deep link refers to a file in shares space
    • Move to "Shares" tab, navigate to the corresponding folder and open preview/details of the file
    • Add necessary tests
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch fix/deep_links_for_shares into master

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.