Following the suggestions from How to add my browser in the default browser selection list in android?. I have specified my Intent
in the manifest
file:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>
I have also added the permission:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
But still my browser is not showing in the default app options for the browser category in the settings.
Do I need to do anything else for my app to show up in the default options for browser?
As mentioned in documentation over developer.android.com
you need to set intent filer as below
Consider using
CATEGORY_APP_BROWSER
with your main filter:You can achieve this programatically, like this:
and also it will be good, if you put a check for the app existence on phone.
Happy Coding :)
You can do it with
Intent-Filter
by making yourActivity
Browsable.using below code in Android manifest File.You can do it with
Launcher
Activity.And you must provide
scheme
ashttp
andhttps
for links to be open with your Application.Try to include the
<category android:name="android.intent.category.BROWSABLE" />
in your target activity'sintent-filter
as developer documentation said:It is required in order for the
intent-filter
to be accessible from a clickable link. Without it, clicking a link cannot resolve to your app..
Additional Tip: (If you want to force your app to be the default browser)
Android App Links on Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from their device's system settings.
To enable link handling verification for your app, set
android:autoVerify="true"
inintent-filter
tag:You need to consider various cases that may be applicable.
Please refer the intent-filters below. Also link is provided at the end.
Look at the different types of intent-filters you might need in order to cover all possible cases.
Refer to this link - complete manifest file of froyo browser.