Click the confirmation email link to open the app.
I am creating a mobile app using Meteor. When a user signs up, I send him a confirmation email. When he opens the email and clicks on the link, he is redirected to myapp.com/
which is the mobile version of my app. Instead, when he clicks on a link, I want the app to open so that it starts the app right away.
I thought it was possible by setting up a custom url scheme. To install it, I can use this cordova plugin . However, what if the user opens the confirmation link on their computer? Is there a way to redirect it to a mobile web page when it opens it on a computer and open the app otherwise?
source to share
: , URL , . , "" - ββ , ( ) URL-, .
As for your question, I don't see any other way to check if a user is on a mobile device or a desktop device than to check the user agent. Before redirecting to a custom url scheme I would check if it is a mobile browser and then redirect to a custom url scheme or if it looks like a desktop browser go to the page.
There seems to be some packages to detect devices correctly, for example: https://atmospherejs.com/mystor/device-detection
source to share