Home > database >  WearOS support for PWA
WearOS support for PWA

Time:05-14

I'm digging over internet on how to make a PWA app made with react.js run over WearOS, but I do not find any article. Also, the WearOS website is empty of information of this type, as well. Is the WearOS able to run a PWA app? What are the differences between a WearOS PWA app and a normal Android PWA app? If PWA can run on WearOS, all the APIs (GPS, Phone, camera, BT, wifi, etc.) are available to the app?

CodePudding user response:

Progressive Web Apps are NOT supported since the required WebKit APIs aren't available.

From: https://developer.android.com/training/wearables/wear-v-mobile

Feature: Connectivity

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

From: 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.

CodePudding user response:

Technically you could install Samsungs browser. https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser&hl=en_GB&gl=US

But you probably won't have access to most of the APIs you are after.

https://stackoverflow.com/a/69551661/1542667

You could also embed a browser component like Gecko https://stackoverflow.com/a/69551661/1542667

But it's probably as much work as implementing a basic wear app, which will be easier for users.

  • Related