RSDActiveUIStep

public protocol RSDActiveUIStep : RSDUIStep

RSDActiveUIStep extends the RSDUIStep to include a duration and commands. This is used for the case where an RSDUIStep has an action such as start walking or stop walking; the step may also implement the RSDActiveUIStep protocol to allow for spoken instruction.

  • The duration of time to run the step. If 0, then this value is ignored.

    Declaration

    Swift

    var duration: TimeInterval { get }
  • The set of commands to apply to this active step. These indicate actions to fire at the beginning and end of the step such as playing a sound as well as whether or not to automatically start and finish the step.

    Declaration

    Swift

    var commands: RSDActiveUIStepCommand { get }
  • Whether or not the step uses audio, such as the speech synthesizer, that should play whether or not the user has the mute switch turned on.

    Declaration

    Swift

    var requiresBackgroundAudio: Bool { get }
  • Should the task end early if the task is interrupted by a phone call?

    Declaration

    Swift

    var shouldEndOnInterrupt: Bool { get }
  • Localized text that represents an instructional voice prompt. Instructional speech begins when the step passes the time indicated by the given time. If timeInterval is greater than or equal to duration or is equal to Double.infinity, then the spoken instruction returned should be for when the step is finished.

    Declaration

    Swift

    func spokenInstruction(at timeInterval: TimeInterval) -> String?

    Parameters

    timeInterval

    The time interval at which to speak the instruction.

    Return Value

    The localized instruction to speak or nil if there isn’t an instruction.