Android: Recognized As An App Or Activity That Can Be Made "default"
When installed more than one Browser and the default is not set, I will get the chooser dialog with the possibility to set the default. How does an application (or Activity) made i
Solution 1:
It's achieved by adding appropriate <action> to <intent-filter> in your manifest file, so that Android knows what actions your app can perform and intents it can respond to.
Solution 2:
Intentintent=newIntent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.google.com"));
startActivity(intent);
will bring up the browser chooser including the default checkbox. The data needs to be something of "http:" or "https:"-type.
Selecting an item in the dialog of course will open the browser going to the specified URL. And that is actually the case when at the base Home app when clicking to the browser icon.
This is not 100% what I hoped (100% would be open a browser without going to the URL), but acceptable.
Post a Comment for "Android: Recognized As An App Or Activity That Can Be Made "default""