Content
View differences
Updated by Marc Alcobé 3 months ago
**ON HOLD: Requires web app work on API**
<br>
**As** a mobile user
**I want to** see a WorkPackage in the mobile app when I click a link in my email on mobile
**Problem:** We have to specify each subdomain separately in the app which hardly possible to achieve. also we can't specify on-premice domains.
**Available options**
* use url schema instead of http link.
in this case we don't have to rely on domain names. Also we are able to configure links as we need:
i.e.: `openproject://workpackage/12345`
or `openproject://notifications`
* use redirect links. So we will stick always to one domain and then redirect to a correct instance or to the app
i.e.: [`https://openproject.com/deep-linking?instance:custom-domain;content:workpackage/12345`](https://openproject.com/deep-linking?instance:custom-domain;content:workpackage/12345)
* wild option (most likely useless) - predefine a huge list of possible associated domains in the app.
* maybe inside the email we can add a separate button "see in the app" that will have a dedicated url?
<br>
<br>
**UPD (15.01.26):** _The outcome after a meeting with Marc, Markus, Christophe and Oleksii._
1\. we indicated that for achieving deep linking in the app we need two things.
* having files for [iOs](https://github.com/opf/openproject-website/blob/release/source/.well-known/apple-app-site-association) and [Android](https://github.com/opf/openproject-website/blob/release/source/.well-known/assetlinks.json) on the root of the domain (in the /_**.well-known**_/ folder)
* registering domains name in the app ([AndroidManifest](https://github.com/opf/openproject-app/blob/dev/android/app/src/main/AndroidManifest.xml) and [plist flie](https://github.com/opf/openproject-app/blob/dev/ios/Runner/Runner.entitlements)). Ideally wildcards (like \*.openproject.com) should work for both platforms.
2\. we realised that common scenarios for sending deelinks most likely will be just a raw link that was copy/pasted from the browser, so we can't use an approach with `start.openproject.com` directly).
<br>
3\. we understood that it is hard to find a solution that works for all cases, but we can try to handle different scopes of customers in different manners. Below are the suggestion:
* The easiest and fastest solution. We can set a list of predefined urls in the mobile app (like: \*.openproject.com, \*.openproject-edge.com, et.c, also maybe a list of known customers). At the same time on the backend for all those domains we will add **well-known folders** with android and ios files (see examples in first paragraph of this outcome).
* Second approach will cover all users but it requires changes on the frontend. We can identify that the link was open in the mobile browser by User-Agent and then we can show a popup that "this link can be open in the mobile app as well". By clicking on the link we can redirect user to the app or redirect to the web page with links to Apple Store and Google Play to install the app. for this approach we can use a link in format `start.openproject.com?redirect=openproject.org/wp/42`. Beside that we can use a scheme like `openproject://wp/42`, but the problem here is that if user doesn't have the app, he will show a 404 page in browser.
* Third solution was suggested by Christophe [in the comment](https://community.openproject.org/projects/mobile-app-spike/work_packages/60147/activity#comment-1617895). So during the login process (or even separately in the app) we can set a cookie "appInstalled: true" and redirect user to the app only if such cookie exists and we open the link from mobile browser.
<br>
<br>
<br>
**As** a mobile user
**I want to** see a WorkPackage in the mobile app when I click a link in my email on mobile
**Problem:** We have to specify each subdomain separately in the app which hardly possible to achieve. also we can't specify on-premice domains.
**Available options**
* use url schema instead of http link.
in this case we don't have to rely on domain names. Also we are able to configure links as we need:
i.e.: `openproject://workpackage/12345`
or `openproject://notifications`
* use redirect links. So we will stick always to one domain and then redirect to a correct instance or to the app
i.e.: [`https://openproject.com/deep-linking?instance:custom-domain;content:workpackage/12345`](https://openproject.com/deep-linking?instance:custom-domain;content:workpackage/12345)
* wild option (most likely useless) - predefine a huge list of possible associated domains in the app.
* maybe inside the email we can add a separate button "see in the app" that will have a dedicated url?
<br>
<br>
**UPD (15.01.26):** _The outcome after a meeting with Marc, Markus, Christophe and Oleksii._
1\. we indicated that for achieving deep linking in the app we need two things.
* having files for [iOs](https://github.com/opf/openproject-website/blob/release/source/.well-known/apple-app-site-association) and [Android](https://github.com/opf/openproject-website/blob/release/source/.well-known/assetlinks.json) on the root of the domain (in the /_**.well-known**_/ folder)
* registering domains name in the app ([AndroidManifest](https://github.com/opf/openproject-app/blob/dev/android/app/src/main/AndroidManifest.xml) and [plist flie](https://github.com/opf/openproject-app/blob/dev/ios/Runner/Runner.entitlements)). Ideally wildcards (like \*.openproject.com) should work for both platforms.
2\. we realised that common scenarios for sending deelinks most likely will be just a raw link that was copy/pasted from the browser, so we can't use an approach with `start.openproject.com` directly).
* The easiest and fastest solution. We can set a list of predefined urls in the mobile app (like: \*.openproject.com, \*.openproject-edge.com, et.c, also maybe a list of known customers). At the same time on the backend for all those domains we will add **well-known folders** with android and ios files (see examples in first paragraph of this outcome).
* Second approach will cover all users but it requires changes on the frontend. We can identify that the link was open in the mobile browser by User-Agent and then we can show a popup that "this link can be open in the mobile app as well". By clicking on the link we can redirect user to the app or redirect to the web page with links to Apple Store and Google Play to install the app. for this approach we can use a link in format `start.openproject.com?redirect=openproject.org/wp/42`. Beside that we can use a scheme like `openproject://wp/42`, but the problem here is that if user doesn't have the app, he will show a 404 page in browser.
* Third solution was suggested by Christophe [in the comment](https://community.openproject.org/projects/mobile-app-spike/work_packages/60147/activity#comment-1617895). So during the login process (or even separately in the app) we can set a cookie "appInstalled: true" and redirect user to the app only if such cookie exists and we open the link from mobile browser.
<br>
<br>