Old script used deprecated Health.read() with Health.Types.* and .quantity — every read silently failed in try/catch, so no samples were ever collected. Rewrote to use Health.queryQuantitySamples() with string type identifiers and .quantityValue(unit) per current Scripting app docs. Added proper units (kg, mmHg, count/min, count, percent) for each metric type. Also adds /scriptable/health-sync.js endpoint to serve the script directly. |
||
|---|---|---|
| .. | ||
| health-sync.js | ||