wingear
wingear

Reputation: 829

Android 6 - cannot open app url from chrome

I had setup intent filter in manifest.xml, such as follows:

    <activity
            android:name="indexgifto.android.ui.viewcontrollers.SplashScreenActivity"
            android:label="@string/application_name"
            android:launchMode="singleTop"
            android:windowSoftInputMode="adjustNothing"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:screenOrientation="portrait" >
        <intent-filter>
            <data android:scheme="gifto"/>
            <data android:scheme="http" />
            <data android:host="www.gifto.net"/>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

When I execute 'am start http://www.gifto.net/go.php?c=xlh201' application successfully opens with required data. But, when same URL opened via Chrome, just server page opens. In the android 4 in both cases my app was able to start from this url. What I must fix in android 6?

Upvotes: 1

Views: 1210

Answers (2)

Tony Hernandez
Tony Hernandez

Reputation: 23

Chrome for Android, versions 25 and later, you should implement a user gesture to launch the app via a custom scheme, or use the “intent:” syntax described in this article.

https://developer.chrome.com/multidevice/android/intents

Upvotes: 2

raj
raj

Reputation: 2088

this worked for me you to try once if worked for u.

    <intent-filter>
      <action android:name="android.intent.action.VIEW"></action>
      <category android:name="android.intent.category.DEFAULT"></category>
      <category android:name="android.intent.category.BROWSABLE"></category>
      <data android:host="www.youtube.com" android:scheme="http" android:pathPrefix="http"></data>
    </intent-filter>

Upvotes: 0

Related Questions