Reputation: 1957
I have created an application which is similar to the website. When a user visits the website on their iOS or Android device I want to output a link which lets them open or download the application.
For example when you visit Youtube on your mobile device a popup appears saying Open this page in "YouTube":
If you click this popup it opens the YouTube app on my phone.
I want to do this with my website and application. The app is created using Cordova. Does anyone know how to do this? I found this question which is similar, but it is for native iOS. I need a cross platform Cordova solution.
Upvotes: 1
Views: 2294
Reputation: 1957
In case someone is looking for a similar solution in the future.
As @sanat shukla mentioned in the comments there is a plugin created by EddyVebruggen which allows you to do this:
https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin
Upvotes: 1
Reputation: 9257
Try this :
<activity android:name=".MyActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="www.myapp.com" android:scheme="MyApp" />
</intent-filter>
</activity>
Upvotes: 2