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!!
您是否已在清单中添加值为“ ACTION_VIEW”的“ action”属性?
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。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.