Search code examples
androidandroid-intentintentfilter

Don't оpen custom link from browser


My app can open a special link. It's great when I click to link in a mail or saved note. But I do not want see a dialog with a choice of app when i click on a link from the browser. User has chosen browser and went to my site, and it turns out that at each transition to a new page it is necessary to choose the browser again. Can I somehow disable the selection of the app, if clicked on a link in the browser?

P.S. Sorry for my english.


Solution

  • in manifest:

            <activity
    
                 ...
    
            <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>
        </activity>
    

    i removed the line:

    <category android:name="android.intent.category.BROWSABLE"/>
    

    and it works as I wanted.

    Thank all for your answers!