Pause an ActivityRecording

Former Member
Former Member
Hey!
Is there a way to pause a session? if there isn't,then what is the best way to make it act like it's pausing?
And can anyone point me to an example code or describe me how to record a map?

Thank you!:)
  • session.stop() is equivalent to pause. To resume, call session.start(). When you want to terminate your activity, be sure the session has been stopped and then call session.save() or session.discard()

    Travis
  • Like Travis said, you have to make the calls yourself in your app. Thinks like "auto-pause" for running are not used in a custom app.

    Same with auto-lap. It's not used by a custom app, so you must do it yourself.
  • Former Member
    Former Member over 10 years ago
    After i press session.stop and i want to resume do i call session = Record.createSession() and then session.start?
  • Former Member
    Former Member over 10 years ago
    No, that would terminate your session and create a new one. To restart recording you just need to call session.start().

    The session is created with createSession(), and terminated with save() or discard(). Recording is started and stopped for that session with start() and stop().
  • Former Member
    Former Member over 10 years ago
    Thank you Brian you are the MASTER!
  • Former Member
    Former Member over 9 years ago
    13205

    Hi all,
    i got an issue with the session.stop() and session.start() functions on my vivoactive.
    I want to use this in my app but the session continues recording (time, distance and so on) even if i called session.stop().
    Is this an "undocumented feature" ore what else have i to do to really stop the session recording anything?
  • When you do a session.stop() (for a pause), elapsedTime will continue to run (it's the time since you first started the recording), but timerTime will stop. So if you want to see the time that things were recorded, (not paused), it's timerTime
  • Former Member
    Former Member over 9 years ago
    Ok thank you, this would solve the problem with the time... but what about the elapsedDistance? This is recording too even when session is stopped..
    I mean, for what should this "stop" be good if everything is still continue recording? :confused:
  • I think the distance thing is sorted out when the .fit is uploaded to GC.

    What you can do (while watching timerTime or just noting it in your code) is track the distance while paused, and subtract that distance from elapsedDistance when you display your distance.
  • Former Member
    Former Member over 8 years ago
    Sorry to necro this thread. I tried
    * session.start()
    * grab a GPS reading
    * session.stop()
    * repeat,etc,

    but my FIT file has no GPS data even though I'm seeing the GPS data on the watch screen.

    If I don't do this starting and stopping of the recording, the GPS data is all there.

    I'm trying just record points, rather recording the whole journey (and don't care about straight lines on my map). I'm stopping the recording until the GPS signal is good, and then restarting the recording. I don't want to record the "last known position" you see. Any tips please?