androidintentfilter

Intent filter browsable not work


This is my intent but not work. All browser start but my app is not in list, this is my Manifest:

<activity
            android:name=".MainActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </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="http" android:host="www.googal.com" android:path="/*" />
            </intent-filter>
        </activity>

Solution

  • Try This:

                   <activity
                        android:name=".MainActivity"
                        android:configChanges="orientation|keyboardHidden"
                        android:label="@string/app_name"
                        android:screenOrientation="portrait"
                        android:windowSoftInputMode="adjustPan">
                        <intent-filter>
                            <action android:name="android.intent.action.MAIN" />
                            <category android:name="android.intent.category.LAUNCHER" />
                            <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="www.googal.com" />
                        </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="http" android:host="www.googal.com" />
                        </intent-filter>
                    </activity>