Shan
Shan

Reputation: 2832

How to add my browser in the default browser selection list in android?

I have a app called "TextOnly" ..How to add in the list to select default browser?

Upvotes: 1

Views: 1058

Answers (1)

AndrewPK
AndrewPK

Reputation: 6150

Specify your intent in the android manifest file such as:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/> 
</intent-filter>

make sure:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

is in there too.

reference:

Similarly, if the action is ACTION_VIEW and the data field is an http: URI, the receiving activity would be called upon to download and display whatever data the URI refers to.

Upvotes: 3

Related Questions