【问题标题】:Is it posible to change default search engine from Google.com to some other programmatically for Android browser是否可以以编程方式将默认搜索引擎从 Google.com 更改为其他 Android 浏览器
【发布时间】:2013-09-10 13:13:32
【问题描述】:

我需要以编程方式将默认搜索引擎从 Google.com 更改为其他用于 android 的搜索引擎,或者是否可以更改 android 中默认浏览器的主页?

是否可以从我的应用程序中以编程方式获取默认浏览器的主页 url

【问题讨论】:

    标签: android android-webview android-preferences android-browser android-permissions


    【解决方案1】:

    看起来没有直接的方法。如何使用 ACTION_VIEW 发送打开特定搜索引擎的意图。

    String url = "http://www.yahoo.com";
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(Uri.parse(url));
    startActivity(intent);
    

    还可以查看这个问题:Android: change default Home Application。它可能会提供一些见解

    【讨论】:

    • 这是从应用程序打开浏览器以获取特定 url 的方式。我的问题是如何从应用程序以编程方式更改内置浏览器主页中的设备
    【解决方案2】:

    很抱歉,但我认为您将无法这样做。请转至this,我认为这可能对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-13
      • 2013-04-30
      • 2015-05-25
      相关资源
      最近更新 更多