nextcloud / talk-android

📱😀 Video & audio calls through Nextcloud on Android
Other
530 stars 238 forks source link

Open Talk links in App #847

Open stefan-niedermann opened 4 years ago

stefan-niedermann commented 4 years ago

I have installed latest Nextcloud Talk app (F-Droid) and opened a talk link (https://talk.example.com/call/pasvtaxg).

Expected behavior: Talk Android app opens

Actual behavior: Browser opened.

Similar to https://github.com/stefan-niedermann/nextcloud-deck/issues/498

cc @jancborchardt @nextcloud/designers for a great UX :wink:

MorrisJobke commented 4 years ago

I guess that's not easily possible due to the fact, that we don't know all the URLs that have a running Nextcloud. For the login procedure we use a special URL nc://.. and thus could detect the redirect to the app, but then of course the app is mandatory. Could we somehow detect in the browser if a link is followed and thus try first a nc-talk://... URL on the first request and if this isn't redirected to the app show the app in the browser?

cc @Ivansss @tobiasKaminsky @rullzer

rullzer commented 4 years ago

Yeah, you can only link your browser urls to static apps (that you have to prove you own). Then android can show the request like 'would you like to open X in app Y' etc.

The custom protocol way is actually not recommended and might get deprecated soon. So there is no easy solution to this.

szaimen commented 4 years ago

Actually this proplem was already solved by the files android app. You could also look at the discussion over at: https://github.com/stefan-niedermann/nextcloud-deck/issues/498 for some more infos. for the talk links like https://host/call/idnumber, a pattern like this should work:

<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="*" />
<data android:pathPattern="/.*call/..*" />
mario commented 4 years ago

Yup.

mstyp commented 2 years ago

this is probably obvious to the devs, but its not mentioned in thethread so might as well state it: adding this feature would functionally solve the last issue associated with "no notifications without google play serivces" (except maybe notification badges?).

because the nextcloud services app sends you a notification with the url of the relevant chat room, but right now clicking it opens the browser instead of the talk app.

if this feature was enabled then the functionality of notifications in the talk app would be essentially on par with chat apps like element or signal, even if you are using the fdroid version. you would get a notification, and you could click it to open the relevent chat room.

sowjanyakch commented 4 months ago

This feature cannot be implemented for Android 12+. On Android 11 and below we can provide a generic host name and with Android 12 it is not possible due to security concerns.

Digital Asset Links are introduced as a verification method for Deep links /Android App links. This file acts as a digital handshake between your website and app, verifying ownership of the Deep links/Android App links. https://developer.android.com/studio/write/app-link-indexing

We should set up digital asset links by creating an assetlinks.json file and place it in the website's .well-known directory with read access for everyone.  https://domain.name/.well-known/assetlinks.json

This file should contain information about our app and the Deep links/Android App links it handles.

[{ "relation": ["delegate_permission/common.handle_all_urls"], "target": { "namespace": "android_app", "package_name": "com.nextcloud.talk”, "sha256_cert_fingerprints": ["APP_CERT_FINGERPRINT"] } }]

It is not possible to include all the domains in the assetlinks.json file.

Note: https://github.com/nextcloud/talk-android/tree/open_talk_links_in_app branch contains code to open the talk links in the talk app of the same domain for Android 11 and below.

jancborchardt commented 1 month ago

This feature cannot be implemented for Android 12+. On Android 11 and below we can provide a generic host name and with Android 12 it is not possible due to security concerns.

@sowjanyakch and the app can also not communicate to Android only the specific host names that the account is logged in with? Does it have to be registered beforehand?