4

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.

1
  • 1
    Are you sure it is not the other way around. the first code works, the second doesnt? Refer to my question stackoverflow.com/q/13042278/1503155 , I think we have the same problem. Commented Oct 24, 2012 at 7:04

1 Answer 1

2

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).

Sign up to request clarification or add additional context in comments.

1 Comment

Jean could you elaborate on your second point - i can't get my app to launch from any browser at all -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.