EddyVerbruggen / Custom-URL-scheme

:link: Launch your Cordova/PhoneGap app by a Custom URL scheme like mycoolapp://

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shceme doesn't working. help

Macfa opened this issue · comments

commented

hello

My problem is
When the button is pressed,
Attempt to execute Pay DemoActivity file using URL SCHEME called paysample but failed.

The app runs in the MainActivity,
PayDemoActivity and URL SCHEME are defined to display the payment window when the button is pressed.

But samplepay: // didn't work in the browser.

The URL SCHEME does not seem to be set properly
Please check the code

cordova --version
9.0.0 (cordova-lib@9.0.1)

I installed the plugin using https://github.com/EddyVerbruggen/Custom-URL-scheme and followed the guide. ( Automatically (CLI / Plugman) )
// cordova plugin add https://github.com/EddyVerbruggen/Custom-URL-scheme.git --variable URL_SCHEME=paysample

here is my code

AndroidManifest.xml
<activity android:alwaysRetainTaskState="true" android:launchMode="singleTask" android:name="???.PayDemoActivity" android:screenOrientation="portrait"> <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="paysample" android:host="card_pay"/> </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> </activity>

Config.xml
<feature name="LaunchMyApp"> <param name="android-package" value="nl.xservices.plugins.LaunchMyApp" /> </feature> <plugin name="LaunchMyApp" value="nl.xservices.plugins.LaunchMyApp" /> <feature name="Custom URL scheme"> <param name="id" value="cordova-plugin-customurlscheme" /> <param name="url" value="https://github.com/EddyVerbruggen/Custom-URL-scheme.git" /> <variable name="URL_SCHEME" value="paysample" /><!-- change as appropriate --> </feature>

pay.php
... <a href="paysample://" class="button_orange_white payment">결제하기</a> ...

PayDemoActivity
... private final String SCHEME = "paysample://"; ...