I've already been able to setup deep links (universal links), whenever a link to my site (https://app.example.com) is clicked, it automatically opens the app. If its from slack, messenger or another website. The problem is, if I'm inside app.example.com and I create a link to open app.example.com, it doesn't open the app.
I cant seem to find any documentation to address this problem and I'm not sure if its even allowed, but basically this is the flow that I want to achieve:
- (inside app) Click Connect Wearable button
- (in browser) Default browser opens wearable's login page
- (in browser) Wearable redirects to my own site (https://app.example.com/confirmed)
- (in browser) Inside this page is a button that says Return to App [href="https://app.example.com/"]
- (inside app) App opens
But as mentioned, step 5 doesn't open the app even if I placed a link-button (as expected on how universal links work), it just redirects within the browser.
Any solution? I need to be able to handle android and iOS, as well as not interfere with PC browsers. If needed, I code using Ionic v6.
Thank you!
CodePudding user response:
You can try defining custom URI scheme for your apps like "myApp://" and use that inside the button in browser.
CodePudding user response:
As far as I know, this is expected behavior.
The reason is,
Let's say your user actually chose to navigate to your website instead of the application. Since the user is already browsing the website, we can assume the user will keep browsing the website, otherwise, he or she would be inside the app already.
This user might navigate to different pages on your website. If deep links try to send users to the app every time, it would be a terrible UX.
If your intent is to always open the app anyways, using a custom URI scheme is the way to go.