Custom-URL-scheme
Custom-URL-scheme copied to clipboard
Android's Custom-scheme not working
cordova version:7.0.1
node version:9.6.1
android version:6.2.3
First I got this error message: Failed to restore plugin "LaunchMyApp" from config.xml. You might need to try adding it again. Error: Error: Registry returned 404 for GET on https://registry.npmjs.org/LaunchMyApp
I including the js file and setting the custom the scheme like that:
(config.xml)
<plugin name="cordova-plugin-customurlscheme" spec="git+https://github.com/EddyVerbruggen/Custom-URL-scheme.git"> <variable name="URL_SCHEME" value="guavaapp" /> <variable name="ANDROID_SCHEME" value=" " /> <variable name="ANDROID_HOST" value=" " /> <variable name="ANDROID_PATHPREFIX" value="/" /> </plugin>
(AndroidManifest.xml) in this file, it auto increase two 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="wangapp" /> </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:host=" " android:pathPrefix="/" android:scheme=" " /> </intent-filter>
and I found someone say I need to change android:launchMode="singleTop" to singleTask But still not working on android, ios is fine. Has anyone can help me fix it?
same on our side did you find any solution?
Any solution ? same issue here
It looks like the package name may have changed from "LaunchMyApp" to "cordova-plugin-customurlscheme". Once I made this change in the package.json, everything worked fine.
"cordova": {
"plugins": {
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "customurl",
"ANDROID_SCHEME": " ",
"ANDROID_HOST": " ",
"ANDROID_PATHPREFIX": "/"
}
},
"platforms": [
"android"
]
}