NavigationEventsManager

open class NavigationEventsManager

The NavigationEventsManager is responsible for being the liaison between MapboxNavigation and the Mapbox telemetry framework.

  • Optional application metadata that that can help Mapbox more reliably diagnose problems that occur in the SDK. For example, you can provide your application’s name and version, a unique identifier for the end user, and a session identifier. To include this information, use the following keys: “name”, “version”, “userId”, and “sessionId”.

    Declaration

    Swift

    public var userInfo: [String : String?]?
  • When set to false, flushing of telemetry events is not delayed. Is set to true by default.

    Declaration

    Swift

    public var delaysEventFlushing: Bool
  • Create feedback about the current road segment/maneuver to be sent to the Mapbox data team.

    You can pair this with a custom feedback UI in your app to flag problems during navigation such as road closures, incorrect instructions, etc.

    If you provide a custom feedback UI that lets users elaborate on an issue, you should call this before you show the custom UI so the location and timestamp are more accurate. Alternatively, you can use FeedbackViewContoller which handles feedback lifecycle internally.

    Postcondition

    Call sendFeedback(_:type:source:description:) with the returned feedback to attach additional metadata to the feedback and send it.

    Declaration

    Swift

    public func createFeedback(screenshotOption: FeedbackScreenshotOption = .automatic) -> FeedbackEvent?

    Return Value

    Returns a feedback event.

  • Send active navigation feedback to the Mapbox data team.

    You can pair this with a custom feedback UI in your app to flag problems during navigation such as road closures, incorrect instructions, etc.

    Declaration

    Swift

    public func sendActiveNavigationFeedback(_ feedback: FeedbackEvent, type: ActiveNavigationFeedbackType, description: String? = nil)

    Parameters

    feedback

    A FeedbackEvent created with createFeedback() method.

    type

    A ActiveNavigationFeedbackType used to specify the type of feedback.

    description

    A custom string used to describe the problem in detail.

  • Send passive navigation feedback to the Mapbox data team.

    You can pair this with a custom feedback UI in your app to flag problems during navigation such as road closures, incorrect instructions, etc.

    Declaration

    Swift

    public func sendPassiveNavigationFeedback(_ feedback: FeedbackEvent,
                                              type: PassiveNavigationFeedbackType,
                                              description: String? = nil)

    Parameters

    feedback

    A FeedbackEvent created with createFeedback() method.

    type

    A PassiveNavigationFeedbackType used to specify the type of feedback.

    description

    A custom string used to describe the problem in detail.