Reputation: 1469
I have implemented the code for the URL Scheme as shown below in manifest.xml. this code is not working for any browser.
<activity
android:name=".Event"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan|stateAlwaysVisible" >
<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="http" android:host="xyz" />
</intent-filter>
</activity>
The below code is working only for default browser.
<activity
android:name=".Event"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan|stateAlwaysVisible" >
<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="xyz" />
</intent-filter>
</activity>
so, please give me the solution to work custom URL Scheme with any browser or what i have to change in above code for this problem.
Upvotes: 4
Views: 6371
Reputation: 21
To first code: adding android:pathPattern=".*"
should fix it for http scheme.
To second code: for Chrome you have to use intent:
syntax. Chrome does not listen to custom schemes (any more).
Upvotes: 2