Skip to content

Commit 6466f72

Browse files
#173 Android style deep linking
1 parent 8cf871f commit 6466f72

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-customurlscheme",
3-
"version": "4.1.5",
3+
"version": "4.2.0",
44
"description": "Launch your app by using this URL: mycoolapp://, you can add a path and even pass params like this: mycoolerapp://somepath?foo=bar",
55
"cordova": {
66
"id": "cordova-plugin-customurlscheme",

plugin.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
id="cordova-plugin-customurlscheme"
5-
version="4.1.5">
5+
version="4.2.0">
66

77
<name>Custom URL scheme</name>
88

@@ -22,9 +22,6 @@
2222
<issue>https://github.com/EddyVerbruggen/Custom-URL-scheme/issues</issue>
2323

2424
<preference name="URL_SCHEME" />
25-
<preference name="ANDROID_HOST" />
26-
<preference name="ANDROID_SCHEME" />
27-
<preference name="ANDROID_PATHPREFIX" />
2825

2926
<engines>
3027
<engine name="cordova" version=">=3.0.0"/>
@@ -50,6 +47,10 @@
5047

5148
<!-- android -->
5249
<platform name="android">
50+
<preference name="ANDROID_SCHEME" default=" " />
51+
<preference name="ANDROID_HOST" default=" " />
52+
<preference name="ANDROID_PATHPREFIX" default="/" />
53+
5354
<js-module src="www/android/LaunchMyApp.js" name="LaunchMyApp">
5455
<clobbers target="window.plugins.launchmyapp" />
5556
</js-module>
@@ -64,11 +65,18 @@
6465

6566
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
6667
<intent-filter>
68+
<action android:name="android.intent.action.VIEW" />
69+
<category android:name="android.intent.category.DEFAULT" />
70+
<category android:name="android.intent.category.BROWSABLE" />
6771
<data android:scheme="$URL_SCHEME"/>
72+
</intent-filter>
73+
<intent-filter>
6874
<action android:name="android.intent.action.VIEW" />
6975
<category android:name="android.intent.category.DEFAULT" />
7076
<category android:name="android.intent.category.BROWSABLE" />
71-
<data android:scheme="$ANDROID_SCHEME" android:host="$ANDROID_HOST" android:pathPrefix="$ANDROID_PATHPREFIX" />
77+
<data android:scheme="$ANDROID_SCHEME"
78+
android:host="$ANDROID_HOST"
79+
android:pathPrefix="$ANDROID_PATHPREFIX" />
7280
</intent-filter>
7381
</config-file>
7482
</platform>

0 commit comments

Comments
 (0)