I have an android phone with multiple browsers installed and I might or might not set a browser to default.
So, my question is..
- From my App, How do I force open a link only in the NATIVE android browser?
- Is there a way I can know if there is a browser set to default or not?
You have to make the following for calling the native browser
Finally figured it out. resolveActivity works with MATCH_DEFAULT_ONLY flag on PackageManager instance..
try something like this.
for your second question you can use
PackageManager
.get instance of
PackageManager
and query it for specific action, data and category of
Intent
.it might occur ActivityNotFoundException while the package name is different by manufacturer. Please refer to this answer, wish it would help.
https://stackoverflow.com/a/14723703/1083128