CIQ PlayTone() Beep

Rookie question I think... searched here first and checked the API docs. Sorry if this has been answered.

My custom datafield is almost done. My final touch is to play a tone when my metric crosses a set threshold.

The Attention.playTone(XX) function works. But it starts a never ending tone! :-)

I can't find a way to stop the tone, or play for a particular duration. Ugh.

Any tips are much appreciated.
  • I take it that this is on a real device and not in the sim. Which device and which tone?

    Are you sure you're not in a state where you keep calling playTone() in your code every time compute() is called or something?
  • Former Member
    Former Member over 8 years ago
    Although current version of programmer's guide states, that Attention module is allowed to use in DataField, but s couple of months earlier I remember looking through forum thread, which stated that watch kept on restarting after VibeProfile was used in CIQ data field. Still not sure if it's possible to vibe or play tones in DF, since it was never explained explicitly in either samples or SDK documentation...
  • Solved! Thanks

    Thanks for the reply.

    1. Yes, tones work perfectly, at least in the Sim and on my Edge 520 device, in a complex datafield.

    2. Yes, sorry... I was in a once per second loop that hit the playtone() each time. Thought my logic avoided that. Dumb error.
  • I'd put together a really simple df for the 230 a while back that just does a Attention.vibrate() every minute, and that too works fine. Seems back when the restart problem occurred when the watch still has 1.2 CIQ.
  • Sorry if it is not the right place to ask this. But  I'm also interested in a similar issue.

    A couple of days ago my edge 520plus landed elsewhere after a crash and I could not find until it beeped when connected back to my smartphone. I was wondering whether it is difficult to implement an app for any of the devices to make the edge beep continously until pressed a button, a sound that one can trigger remotely from the smartphone to help find the lost device in the middle of the grass. Is there anything like this?

    The Garmin detected the incidence, so it could beep continously in case of such detection until a button is pressed or snoozed from the smartphone.

    I would like to develop it but I'm new to the development of apps/widgets for Garmin.

    Any suggestion and help is very welcome.

    Thanks!

    Miguel