Reputation: 37
I'm very new to the app-development and recently tried to develop an Android-App using Cordova. I got stuck at the following problem:
The user needs to sign up, recieves a Mail which he should use to "activate" the Account by opening a link. As far as I know, there is a way to open specific links in an app instead of the webbrowswer, isn't it? - So I'd like the activation-link in the E-Mail to be opened with my cordova-app instead of the webbrowser. Is this possible?
If it isn't possible, maybe I can do it like this: The user clicks the link and gets redirected to the website which has a Button like "Open the app now", that actually just opens the cordova app.
Thanks for any help!
Upvotes: 1
Views: 1843
Reputation: 327
There is a custom url scheme plugin for that. to install type:
cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=mycordovaapp
replace 'mycordovaapp' to something that matches your app and contains no space.
now create a link on your website
<a href="mycordovaapp://">Open app now</a>
Also refer to docs
I just found out with this plugin and InAppBrowser you can launch your cordova app from another cordova app by-
<button onclick="window.open('mycordovaapp://', '_system')">Open the other app</button>
Upvotes: 2