user5141031
user5141031

Reputation:

How do I make my web browser app show up in "Open with..." when clicking a link?

When I click a link in something like Gmail, how can I have my web browser show up as an option to open said link? And what code would I implement to go about it? Even just a link to the correct documentation would be incredibly helpful.

Thanks!

Upvotes: 2

Views: 192

Answers (2)

Phillip
Phillip

Reputation: 255

For your app to be on the list of apps, you need an <intent-filter> that support web browsing. You can look at this link as a reference and determine what you need to add.

Upvotes: 1

Machado
Machado

Reputation: 14489

You are probably missing to declare this <intent-filter> in your Manifest

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

Upvotes: 1

Related Questions