Open the default browser settings page programmatically

Is there a way to open the default browser settings page for Android programmatically from an application?

Through some intention? or Maybe another way to do this?

0
source share
1 answer

Yes, we can use this code to call the browser settings page from our application

 Intent i = new Intent(Intent.ACTION_MANAGE_NETWORK_USAGE);
// It launches Chooser without specify the package name becz ACTION_MANAGE_NETWORK_USUAGE  // action is used in Other apps also.
 i.setPackage("com.android.browser");
 startActivity(i);

Note: it supports APi14, why does this mean that the settings page is not accessible from outside the browser. From Api14, they provide the intent for this. Based on this action, we can access it from the outside.

+1
source

Source: https://habr.com/ru/post/1683223/


All Articles