Skip to content

Commit

Permalink
#173 Android style deep linking
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Jun 2, 2016
1 parent 8cf871f commit 6466f72
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-customurlscheme",
"version": "4.1.5",
"version": "4.2.0",
"description": "Launch your app by using this URL: mycoolapp://, you can add a path and even pass params like this: mycoolerapp://somepath?foo=bar",
"cordova": {
"id": "cordova-plugin-customurlscheme",
Expand Down
18 changes: 13 additions & 5 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-customurlscheme"
version="4.1.5">
version="4.2.0">

<name>Custom URL scheme</name>

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

<preference name="URL_SCHEME" />
<preference name="ANDROID_HOST" />
<preference name="ANDROID_SCHEME" />
<preference name="ANDROID_PATHPREFIX" />

<engines>
<engine name="cordova" version=">=3.0.0"/>
Expand All @@ -50,6 +47,10 @@

<!-- android -->
<platform name="android">
<preference name="ANDROID_SCHEME" default=" " />
<preference name="ANDROID_HOST" default=" " />
<preference name="ANDROID_PATHPREFIX" default="/" />

<js-module src="www/android/LaunchMyApp.js" name="LaunchMyApp">
<clobbers target="window.plugins.launchmyapp" />
</js-module>
Expand All @@ -64,11 +65,18 @@

<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
<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:scheme="$URL_SCHEME"/>
</intent-filter>
<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:scheme="$ANDROID_SCHEME" android:host="$ANDROID_HOST" android:pathPrefix="$ANDROID_PATHPREFIX" />
<data android:scheme="$ANDROID_SCHEME"
android:host="$ANDROID_HOST"
android:pathPrefix="$ANDROID_PATHPREFIX" />
</intent-filter>
</config-file>
</platform>
Expand Down

0 comments on commit 6466f72

Please sign in to comment.