Which manifest tag makes my app available as default browser app?

198 views Asked by At

I made an browser app for android and i want to make it available as browser app so i can choose it as default phone browser.

I have tried some intent filters but that did not work for me. I only can send texts or links to my application an it will open it but i want to make it choosable as default browser

What do i have to do? Please suggest me!!

2

There are 2 answers

1
user6281889 On

Have you add the "action" attribute in manifest, with value "ACTION_VIEW" ?

0
peter zhang On

add intent filter in your main activity

        <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" />
        </intent-filter>

and then, when click link in other app,your app will be in the popup chooser, choose it as default。