Search code examples
androidandroid-webviewandroid-websettings

Why do my app registers itself as a browser?


I create an app.But the issue is it registers itself as a browser. When on the phone I click any link the options show browser and my app. Why it is like that?


Solution

  • Your application has registered intent filters for handling intents of the http scheme.

    There's an example of building a custom browser on Lars Vogel's blog, which boils down to:

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".BrowserActivitiy"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="http"/>
            </intent-filter>
        </activity>
    </application>
    

    If you wish to disable this behavior, remove the <intent-filter> tag from your activity.