WearOS 对 PWA 的支持

WearOS support for PWA

我正在互联网上研究如何在 WearOS 上使用 react.js 运行 制作 PWA 应用程序,但我没有找到任何文章。此外,WearOS 网站也没有此类信息。 WearOS 是否能够 运行 PWA 应用程序? WearOS PWA 应用程序和普通 Android PWA 应用程序有什么区别?如果 PWA 可以 运行 在 WearOS 上,所有 API(GPS,Phone,相机,BT,wifi 等)都可以用于该应用程序?

Progressive Web Apps 不受支持,因为所需的 WebKit API 不可用。

发件人:https://developer.android.com/training/wearables/wear-v-mobile

Feature: Connectivity

For example, the android.webkit APIs aren't supported.

发件人:https://developer.android.com/training/wearables/data/network-access

Network Access

You can use protocols such as HTTP, TCP, and UDP. However, the android.webkit APIs (including the CookieManager class) are not available. You can use cookies by reading and writing headers on requests and responses.

从技术上讲,您可以安装三星的浏览器。 https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser&hl=en_GB&gl=US

但是您可能无法访问您想要的大部分 API。

您还可以嵌入浏览器组件,例如 Gecko

但这可能与实现一个基本的穿戴应用程序一样多,这对用户来说会更容易。