01-23-2019 05:57
01-23-2019 05:57
I see that VibrationPatternName is documented here
https://dev.fitbit.com/build/reference/device-api/haptics/#vibrationpatternname
but how to access it?
I tried using the repl to search for it... no luck
fitbit$ repl$ var haptics = require('haptics') fitbit$ repl$ for (x in haptics) console.log(x) fitbit$ repl$ for (x in haptics.vibration) console.log(x)
Thanks!
Answered! Go to the Best Answer.
01-30-2019 07:55
01-30-2019 07:55
You have to have your own array of the names, as per the app that you linked.
01-28-2019 16:18
01-28-2019 16:18
Try:
import { vibration } from "haptics"; vibration.start("ring");
From the documentation:
https://dev.fitbit.com/build/reference/device-api/haptics/
Rich
01-29-2019 07:05
01-29-2019 07:05
The question is about the VibrationPatternName variable/constant.
01-29-2019 10:17
01-29-2019 10:17
It's just a list of possible vibration pattern names.
| "alert"
| "bump"
| "confirmation"
| "confirmation-max"
| "nudge"
| "nudge-max"
| "ping"
| "ring"
01-30-2019 06:44
01-30-2019 06:44
But how I can read that list from my app?
How can I use it in the app?
I would like to use that list in an app, so that I can dynamically create the list of available patters... for example in this app https://github.com/adiroiban/fitbit-os-haptics
Thanks!
01-30-2019 07:55
01-30-2019 07:55
You have to have your own array of the names, as per the app that you linked.