Repository navigation
Description
Research about handling deep links
What's expected on Deep Links:
user clicks on a link in the device (no matter where: mail, web...):
- App is opened
- Account is selected, if more than one
- Browse through folder structure to reach the pointed item. In case it's not discovered, all the structure must be discovered on the road.
What should be researched:
-
How brandable could the link be. Basic link is something like
https://demo.owncloud.com/f/7. Prefix and URL to be brandable, so that we can open:mycompany://mycompany.thebest.com/index.php/f/13with same effect. Scheme, host and preffix could have different values. (here there are some Android version regards, i guess). Desirable: use as defaultowncloud://scheme. -
Check if this first iteration is still useful. In there, links to already discovered items are open. Branding options for host and preffix also there.
-
Which information to be sent to backend team to make this posible. Automatic verifications could be involved (check this)
-
Logic to develop, check feasibility and estimation (maybe the longest part)
- Solve link to get the path to the item: https://github.com/owncloud/enterprise/issues/4970#issuecomment-1040540303
- Browse/discover to open item (file or folder). Take in account the browsability.
-
Does make sense to split up in different parts as in the 1st try?:
-
- Open discovered files and folders in single account
-
- Open non-discovered in single account
-
- Open anything in multiaccount
-
-
If time allows, do a quick proof of concept of the easiest case
Any other idea ... always welcome.
Activity
jesmrec commentedon Jun 16, 2023
@michaelstingl one questions about expected behaviour: working in both oC10 / oCIS? in that case, same link format in both?
In case of oCIS, we have to add another step: check which space/drive does contain the folder.
michaelstingl commentedon Jun 16, 2023
oCIS focus. So yes, we'll have to deal with Spaces. But meta endpoint should provide this information:
jesmrec commentedon Jun 16, 2023
this will translate the file id into a path to reach the file. But, does the link itself look like in oC10? (i hope so):
<scheme>://<url>/f/<some_id>i did not find this kind of links in oCIS web, only the public links with the
/s/prefix.michaelstingl commentedon Jun 16, 2023
Public links with the
/s/prefix won't work, not in oC10, not with oCIS.Valid oC10 links:
Valid oCIS links:
ADR-11: https://ocis.ocis-traefik.latest.owncloud.works/files?fileId=96fd1fa6-2d2a-4701-be6e-7d15a82ecd95%244c510ada-c86b-4815-8820-42cdf82c3d51%2101275b1d-f963-497e-9e76-7a46cf71d72bmichaelstingl commentedon Jun 16, 2023
oC10 link / fileid resolve
oCIS link / fileid resolve
/remote.php/dav/meta/could be used to get more information.michaelstingl commentedon Jun 16, 2023
@jesmrec @JuancaG05 please provide feedback/ideas if anything else needed from the backend
manuelplazaspalacio commentedon Sep 5, 2023
I was researching the last week about this issue:
You always can use a custom scheme "http" or whatever you want and a custom host for open the app with a deep link. Not with an App link, that needs a scheme "http" or "https".
You can find the differences between direct link and App link here: https://developer.android.com/training/app-links
I check the code and is useful, but I have to change parts of the code, because the OC code it is used has changed.
We need the backend to team develops something so that when opening a link in the browser of an Android device, it exhibits this behavior: https://github.com/owncloud/enterprise/issues/4970#issuecomment-1054274031
But we don't need to publish anything for automatic verification if we don't use App Links.
I continue researching about the next points.
A video opening the oc://android.owncloud.com link in an Android with api 33:
test.webm
michaelstingl commentedon Sep 5, 2023
Tracked in:
manuelplazaspalacio commentedon Sep 7, 2023
I continue checking the possibilities tu open an url with a custom scheme in Android. I create an app to open a page with a "oc" scheme inside a webview. If you use the WebView as is, when you click on the link, the WebView displays an error saying it doesn't recognize that scheme. Later, I added the code shown below to handle deep links and it opens the ownCloud app correctly. So, there is a possibility that if you try to open the deep link from a WebView within an app, it may not open. On the other hand, I have tested it on the 9 most commonly used Android browsers and it works fine there.
michaelstingl commentedon Sep 7, 2023
This sounds great 👍
manuelplazaspalacio commentedon Oct 4, 2023
I have been running tests, and I believe that with this, I can now consider the spike completed. I have obtained the file path through the request to "/remote.php/dav/meta/" with the file's ID. I have updated the containing folders of the file, and then I navigate to the file and display its details.
In this video, it shows how it navigate to the file's details automatically using the deep link, then I view the image and manually navigate back to the initial folder:
deeplinkFile.mp4
In this other video, I demonstrate how to navigate automatically to a folder using the deep link and then manually navigate back to the initial folder:
test.deeplink.folder.mp4
jesmrec commentedon Jan 19, 2024
Everything done here. Let's archive this.