I found many answers for a custom URL-Scheme like this (mycoolapp://somepath
).
This plugin for example adds a custom URL-Sheme.*
But I don’t want a custom URL-Scheme, I want a “normal” URL like this (http://www.mycoolapp.com/somepath
).
If you open this in you Browser or click on a Hyperlink for example, then it should ask you to open my app (like google maps does it).
This question maybe already has an answer, but i can’t find it.
If you don’t know what I mean, that’s how it should look if you click on the link to my website on an Android Device:
Just with my app to select.
You should add an
intent-filter
to youractivity
in the android manifest. Something like this:more on what
data
you can add here: http://developer.android.com/guide/topics/manifest/data-element.htmland even more here on stackoverflow…
What you are looking for is called “Universal Links” on iOS and “Deep Linking” on Android.
And there is a Cordova plugin to handle that: https://www.npmjs.com/package/cordova-universal-links-plugin
What you need to do is detect the device that is connecting to http://www.mycoolapp.com/somepath
If it is a mobile device then you can present them with a page with a link with your custom url scheme that opens your app. Or auto open the custom url of the app if you want.
For the same problem I’ve used existing webintent plugin, modified the android manifest file – add those lines to activity
and modified the index.html ondeviceready:
EDIT
I’ve just noticed a behavior which may be unwanted. When you open the app using the link (intent) from another application, it will (in many cases) create a new instance and not use the already running one (tested with gmail and skype). To prevent this a solution is to change Android Launch mode in config.xml file:
(It works with cordova 3.5, not sure about the older version)
Then you need to add one more function to ondeviceready:
This one is triggered when the app was already running and was brought to front with intent.
For anyone looking to use this answer, but modifying the AndroidManifest via config.xml, the following did the trick for me. Trying to match on
android:name
didn’t work no matter which permutations I used.propecia coupon – http://finasteridepls.com/ hair growth pills propecia
topical finasteride – propecia and beard growth propecia amazon
buy real tadalafil online – http://xtadalafilp.com/ buy real tadalafil online