android - 亚马逊应用程序是否使用 native 网页 View ?

标签 android ios webview native

我读过一些帖子,说亚马逊应用程序大量使用 WebView

(来源:- https://www.quora.com/Why-does-the-Amazon-app-use-WebView-in-their-Android-and-iOS-applicationhttps://www.teamblind.com/post/Amazon-app--webviews-cuT4sN6C )

现在,我过去在 android 中玩过一些 webview,我将远程 url 加载到 webview,并将该网站的精确版本加载到移动应用程序上。这对我来说是预料之中的。所以我调查了亚马逊的ios应用程序并将其与桌面网站(在移动 View 中)进行了比较,确实它们非常相似。 但是,两个平台上都缺少一些元素。我将附上下面的图片:

(左为ios应用程序,右为桌面上网站的移动 View ) enter image description here enter image description here enter image description here

现在我有几个问题:

  • 当人们在亚马逊的用例中提到“webview”时,他们是在谈论来自 android 和 ios 的 native webview,例如 WebviewWKWebview 吗? ( https://developer.android.com/guide/webapps/webviewhttps://developer.apple.com/documentation/webkit/wkwebview ),或者他们正在谈论像 apache cordova 或 Ionic 这样的混合应用程序技术?

  • 如果它确实是一个原生的webview容器,你可以编辑html来删除一些元素吗?就像移动应用程序中缺少桌面网站上没有的一些内容一样。还添加一些东西,比如现在移动应用程序有“立即购买”按钮和“最喜欢的图标”?

  • 在访问相机、GPS 和所有这些好东西等 native 功能方面,我可以使用 Webview 走多远?

最佳答案

When people mention "webview" for amazon's use-case are they talking about the native webview from android and ios like the Webview and WKWebview?

是的,它们确实是框架 webview。
但他们很有可能使用混合应用技术。

If it is indeed a native webview container, can you edit the html to remove some elements? like how some stuff were missing from the mobile app that weren't on the desktop website. And also add stuff like now the mobile app has "Buy Now" button, and the "favourite icon"?

您可以在 webview 中使用 javascript 编辑 html 以删除/添加元素,但此处情况并非如此。
这些网站针对不同的设备具有特定的不同 UI。 (桌面/移动)
例如:Flipkart 在应用程序上使用移动版本,该版本在浏览器上不可用,除了移动设备上的 Chrome(我猜)。它只是将用户重定向到相应的应用程序商店来下载应用程序。
我假设这是通过检查User-Agent字段来完成的。

How far can i go with Webviews, in terms of having access to native features like camera, gps and all that good stuff?

您可以通过 webview 使用相机和 GPS。
更多信息。 herehere .

关于android - 亚马逊应用程序是否使用 native 网页 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60860804/

相关文章:

Android - C++ for 循环与从 Java 线程调用的 OpenMP(减少)并行化导致段错误

ios - 重用 'expensive' UIViewController

android - 我如何在 webview android 中播放视频?

android - Qt5.4不支持QtWebEngine吗?

android - 使用 OrmLite 加强数据完整性

java - 将当前日期和时间写入 firebase

java - Android Admob Interstitial 内存泄漏

ios - WCSession 只工作一次

ios - 推送通知 - 当应用程序从后台关闭时设置 rootViewController

java - 如何在 android 中更改 webview 的内容大小?