Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open links to Nextcloud files in the app #1069

Closed
jancborchardt opened this issue Jun 4, 2017 · 18 comments
Closed

Open links to Nextcloud files in the app #1069

jancborchardt opened this issue Jun 4, 2017 · 18 comments

Comments

@jancborchardt
Copy link
Member

jancborchardt commented Jun 4, 2017

When you get a link to a file it's opened in the browser. When it's a local link or file you have access to on a server you know, it could be opened in the Android app, right?

Much like for example Youtube has a hook to open Youtube links from emails in the Youtube app. The tricky part of course is that the domains are variable since Nextcloud is self-hosted. Is there a way to register the domains from your accounts for this?

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jun 4, 2017

Unfortunately no :(
Link-patterns need to be "hardcoded" into the app's definition at build time (this is what we did for the login-URLs). So if it is a standard http/https URL we can detect its possible relevance for Nextcloud :(

Sorry 😿

PS: Like you pointed out, it work for youtube since there domain is fixed...

@jancborchardt
Copy link
Member Author

Damn :( that will then be a major drawback. I gjess it's also not possible with wildcards like saying all cloud.. domains could work?

Also not possible on iOS @marinofaggiana?

@mario
Copy link
Contributor

mario commented Jun 5, 2017

This is actually possible but needs to be done on the server side first. If user-agent is ours, just rewrite all links inside NC instance to point to something like nc://serverpath/filepath and we can do it :P

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jun 5, 2017

@mario how can this be achieved? :)

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jun 5, 2017

Ah well, yeah, custom protocol works and is already in place, but that wouldn't be a classic http/https hyperlink...

@mario
Copy link
Contributor

mario commented Jun 5, 2017

@AndyScherzinger sure, but why does it has to be? The general idea is to get this feature. This is how it can be done. Server:

  • detect mobile browser
  • rewrite links
  • done

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jun 5, 2017

@mario that depends on the source, from what I understood:

links from emails

that would mean it is a Nc generated mail which would then need to put in a "web-URL" and an "app-URL". Then of course it could work. Furthermore if you would browse the webUI with your mobile device we can't detect if the app is installed so if it is not installed the user would still need to get http/https links to be able to navigate to the file, right?

I am not against having this feature rather it opposite. I think this would be really great and offer a more seamless integration on the device. My point was rather about me not seeing how we can implement this, since youtube works because it is a single domain where a standard, hard-coded http/https+tld-domain filter works.

@jancborchardt
Copy link
Member Author

Aaah I think I understand what @mario means. The web app knows if it's an instance you have access to and could offer an »Open in app« link. :)

@jancborchardt jancborchardt reopened this Jun 6, 2017
@AndyScherzinger
Copy link
Member

@jancborchardt that would work of course 👍

@mario
Copy link
Contributor

mario commented Jun 30, 2017

Btw. i forgot to comment on this ... we can know if an app is installed by checking if we have something that can handle nc:// ;)

@AndyScherzinger
Copy link
Member

Nextcloud can :) Since we already have this for Login-URLs 😁

@egeu5
Copy link

egeu5 commented Feb 16, 2019

#2562 can be referenced.

@tuxcrafter
Copy link

Is it possible to get deep linking working on Android or iOS?

I need links like https://cloud.example.nl/nextcloud/index.php/f/2872 to be opened on mobile phones with the NextCloud App.

What is the status of this request?

@Giplat
Copy link

Giplat commented Apr 25, 2019

We really need this functionality too. From a business perspective it completely ruins our users' workflow. Because we use 2FA it's incredibly cumbersome to open links from email in the browser. Please please fix this, thank you.

@AndyScherzinger
Copy link
Member

As stated before and in the referenced issues too: standard http/https links won't work ever (for technical reasons), it'll only work for nc://... link which is a feature @tobiasKaminsky started working on.

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented May 2, 2019

We really need this functionality too. From a business perspective it completely ruins our users' workflow. Because we use 2FA it's incredibly cumbersome to open links from email in the browser. Please please fix this, thank you.

This may be possible with a branded app, which we offer as part/extension to our Enterprise subscription (https://nextcloud.com/enterprise/).

Technical background: if the server url is given, Android can bind an url to an app:
https://developer.android.com/training/app-links/verify-site-associations.html

@szaimen
Copy link
Contributor

szaimen commented Nov 19, 2019

As stated before and in the referenced issues too: standard http/https links won't work ever (for technical reasons), it'll only work for nc://... link which is a feature @tobiasKaminsky started working on.

Is there an example how this nc:// link will look like?

I think if the the coherent link to

https://cloud.example.nl/nextcloud/index.php/f/2872

Would look like

nc://f/2872
Or
nc://index.php/f/2872

Then you could easily create links manually that work with the app until what @mario stated is implemented:

detect mobile browser
rewrite links
done

@AndyScherzinger
Copy link
Member

This is actually working but broken for Android 12 - see #9346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants