Re: [device-posture] Fetching the posture type should be async? (#78)

> On Android and Windows at the moment the posture is derived from the fold angle. In the future we may or not have a dedicated API to query the posture directly but that's what we have for now. On Android it means that we need to fetch the hinge angle from the OS and that's an async operation. On Windows there isn't any API to fetch the hinge angle but so far the foldable devices shipping expose a custom sensor that is basically exposing the hinge angle as well. Similar to Android this is a async operation that may not return immediately. We need to first ask the OS access to the sensor and then wait the readings. This is extremely similar to the generic sensors btw.

Why can't we cache these values instead? I mean if the site has access to the device posture, then it will be notified when it changes and then we can store the last value and always return the current one.

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/device-posture/issues/78#issuecomment-869754886 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 28 June 2021 14:55:56 UTC