If you want the fire a short 'bump' alert, to encourage a user to look at their device, but you don't need them to acknowledge or cancel it, what is the best way to do so?
Looking at the API, it's the responsibility of the app to both start and stop the vibration motor. So if you want to create a short 1 second 'bump' alert, would you suggest doing this synchronously in the watchface rendering code (with a 'wait' function) or asynchronously using the Clock tickEvent (or another event)?
If the latter, how do you deal with situation where the clock granularity is set to minutes or hours?
Are there any examples apps/code?
Thank you.
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You don't need to stop the vibrations. They just play once.
import { vibration } from "haptics";
vibration.start("bump");
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
I worked this out eventually 🙂
I understand now that certain alerts were designed to play continuously and others just once. However the API doc doesn't make this clear. I think the documentation could do with a bit of clarification as to which alerts will play continuously until stopped and which are 'one time'.
Interface: Vibration
Functions of the device's vibration motor.
Methods start()
start(pattern: VibrationPatternName)
Returns: boolean
Start a vibration pattern by name.
Available patterns:
stop()
Returns: void
Stop a playing vibration pattern.
If the vibration motor is currently playing a pattern, it will stop. It the vibration motor is not playing anything, this has no effect.
Best AnswerWhat is the code for 3 bump commands every 150mS followed by 5 nudge commands every 250 mS and looping that pattern till the Fitbit button is pressed?
Best AnswerDid you ever get this answered? I am trying to do something similar and cannot get it to work.
Best AnswerI would try with setting a flag
Absolutely untested, just an idea...
(No usable code, just structure)
Best Answer
Fitbit Product Experts Alumni are retired members of the Fitbit Product Expert Program. Learn more
@dzawiskie Have a look at this post
You might want to factor in the weak vibrate on Sense and Versa 3, that gets weaker as the battery level declines. Whereas older models don't suffer in the same way.
Author | ch, passion for improvement.
Best Answer