01-23-2019 05:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-23-2019 05:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

Accepted Solutions
01-30-2019 07:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-30-2019 07:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You have to have your own array of the names, as per the app that you linked.

01-28-2019 16:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-28-2019 16:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-29-2019 07:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The question is about the VibrationPatternName variable/constant.

01-29-2019 10:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-29-2019 10:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-30-2019 06:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-30-2019 07:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You have to have your own array of the names, as per the app that you linked.

