-
Hi is there a way to known if watch have bt connected programaticaly at watchface? Another question, have any possibility to know api level at watchface? Two questions have easy answer at mini-app but what about watchface? Thank you for your help... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Checking Bluetooth status in watch faces works the same way as in apps To check the API level, you need to use getSystemInfo |
Beta Was this translation helpful? Give feedback.
-
You did not specify which API you use for watch faces. If you use API 1, the code should be modified as follows:
|
Beta Was this translation helpful? Give feedback.
-
SystemInfo_WF.zip PS: fetch-api doesn't seem to work on watch faces. So I'm not sure how using fetch-api is related to watch faces. |
Beta Was this translation helpful? Give feedback.
Checking Bluetooth status in watch faces works the same way as in apps
https://docs.zepp.com/docs/1.0/reference/device-app-api/hmBle/
To check the API level, you need to use getSystemInfo
https://docs.zepp.com/docs/v2/reference/device-app-api/newAPI/settings/getSystemInfo/
This function works since API 2.1, so you need to add error handling when calling it. If the function call ends in an error, the device has API 1. Otherwise, the function will return the API value.