打开默认浏览器设置页面编程 [英] Open Default Browser Settings page programmatically

查看:232
本文介绍了打开默认浏览器设置页面编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法打开为Android默认浏览器的设置页面
编程方式从应用程序?

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

通过一些意图是什么?要么
也许一些其他的方式来做到这一点?

Through some intent? or Maybe some other way to do it?

推荐答案

是的,我们可以用这个code呼叫浏览器设置页面,从我们的应用程序

Yes, we can use this code for call 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);

请注意:从APi14支持,为什么这意味着设置页面无法从浏览器。从Api14他们提供了this.based这一行动,我们可以从外部

Note: it supports from APi14 why this means that Settings page is not accessible from outside of Browser .From Api14 they provide intent-action for this.based on this action we can access it from outside

这篇关于打开默认浏览器设置页面编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆