【问题标题】:How to find the current uri of geckoView in android?如何在android中找到geckoView的当前uri?
【发布时间】:2019-10-03 06:12:35
【问题描述】:

GeckoView 中 WebView.getUrl() 的等价物是什么?

我在 WebView 中使用 webView.getUrl(),在 XWalkView 中使用 xWalkView.getUrl()。 我想在我的 android 应用程序中使用 GeckoView,但遇到了 getUrl 部分。 谁能帮帮我?

【问题讨论】:

    标签: android geckoview


    【解决方案1】:

    在 GeckoView 中没有直接获取当前 URL 的方法。

    要实现这一点,您应该通过覆盖 NavigationDelegate.onLocationChange 方法来跟踪当前 URL。你可以在这里看到一个例子:https://searchfox.org/mozilla-central/rev/01d1011ca4a460f751da030d455d35c267c3e210/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#1027

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-27
      • 2019-12-06
      • 2016-04-07
      • 1970-01-01
      • 1970-01-01
      • 2014-07-16
      • 2010-11-15
      • 1970-01-01
      相关资源
      最近更新 更多