ios - HKWorkoutSession: Not getting Heart Rate when screen is turned off in watchOS 2 -


i using ios 9 beta 4 , watchos 2 beta 4.

i can't seem heart rate data when watch screen turns black (locks). call applicationwillresignactive , heart rate data stops.

it seems sensor deactivating after time (not green anymore), when screen locks.

anyone else seeing behavior? can post code initing workoutsession if else getting heart rate data when screen on watch locked.

starting in watchos 3.0 can add wkbackgroundmodes entry workout-processingvalue extension's info.plist.

from docs:

running in background workout sessions can run in background. background running grants app following abilities:

the app continues run throughout entire workout session, when user lowers wrist or interacts different app. when user raises wrist, app reappears, letting user , check current progress , performance.

the app can continue access data apple watch’s sensors in background, letting keep app date @ times. example, running app can continue track user’s heart rate, ensuring recent heart rate data displayed whenever user raises wrist.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -