AlarmContext

Objective-C


@interface AlarmContext : NSObject

Swift

class AlarmContext : NSObject

This class handles the alarm.

  • The delegate for the alarm contex.

    Declaration

    Objective-C

    @property (nonatomic, weak) NSObject<AlarmContextDelegate> *_Nullable delegate;

    Swift

    weak var delegate: (any AlarmContextDelegate)? { get set }
  • Enable the safety camera service.

    Declaration

    Objective-C

    - (void)enableSafetyCamera;

    Swift

    func enableSafetyCamera()
  • Disable the safety camera service.

    Declaration

    Objective-C

    - (void)disableSafetyCamera;

    Swift

    func disableSafetyCamera()
  • Returns true is safety camera service is enable.

    Declaration

    Objective-C

    - (BOOL)isSafetyCameraEnabled;

    Swift

    func isSafetyCameraEnabled() -> Bool
  • Enables the offline data grabber for the safety cameras. @details The offline data grabber downloads an overlay covering dataset for every new downloaded road map content. @details The offline data is automatically grabbed immediately after a road map content download finishes & is stored in the SDK permanent cache

    Declaration

    Objective-C

    - (void)enableSafetyCameraOfflineDataGrabber;

    Swift

    func enableSafetyCameraOfflineDataGrabber()
  • Disables the offline data grabber for the safety cameras.

    Declaration

    Objective-C

    - (void)disableSafetyCameraOfflineDataGrabber;

    Swift

    func disableSafetyCameraOfflineDataGrabber()
  • Check if the offline data grabber for the safety cameras is enabled.

    Declaration

    Objective-C

    - (BOOL)isSafetyCameraOfflineDataGrabberEnabled;

    Swift

    func isSafetyCameraOfflineDataGrabberEnabled() -> Bool
  • Check if the offline data grabber for the safety cameras overlay is supported.

    Declaration

    Objective-C

    - (BOOL)isSafetyCameraOfflineDataGrabberSupported;

    Swift

    func isSafetyCameraOfflineDataGrabberSupported() -> Bool
  • Grab latest safety cameras offline data over all existing offline maps area.

    Declaration

    Objective-C

    - (void)grabSafetyCameraOfflineDataWithCompletionHandler:
        (nonnull void (^)(BOOL))handler;

    Swift

    func grabSafetyCameraOfflineData() async -> Bool
  • Cancel request to grab latest safety cameras offline data.

    Declaration

    Objective-C

    - (void)cancelGrabSafetyCameraOfflineData;

    Swift

    func cancelGrabSafetyCameraOfflineData()
  • Enable the social reports service.

    Declaration

    Objective-C

    - (void)enableSocialReports;

    Swift

    func enableSocialReports()
  • Disable the social reports service.

    Declaration

    Objective-C

    - (void)disableSocialReports;

    Swift

    func disableSocialReports()
  • Enable the social reports service with specific category.

    Declaration

    Objective-C

    - (SDKErrorCode)enableSocialReportsWithCategory:(int)categUid;

    Swift

    func enableSocialReports(withCategory categUid: Int32) -> SDKErrorCode

    Parameters

    categUid

    The social reports category uid.

  • Disable the social reports service for specific category.

    Declaration

    Objective-C

    - (SDKErrorCode)disableSocialReportsWithCategory:(int)categUid;

    Swift

    func disableSocialReports(withCategory categUid: Int32) -> SDKErrorCode

    Parameters

    categUid

    The social reports category uid.

  • Returns true if social reports service is enabled.

    Declaration

    Objective-C

    - (BOOL)isSocialReportsEnabled;

    Swift

    func isSocialReportsEnabled() -> Bool
  • Returns true if social reports service is enabled for the specific category.

    Declaration

    Objective-C

    - (BOOL)isSocialReportsEnabledWithCategory:(int)categUid;

    Swift

    func isSocialReportsEnabled(withCategory categUid: Int32) -> Bool
  • Enables the offline data grabber for the social reports overlay. @details The offline data grabber downloads an overlay covering dataset for every new downloaded road map content. @details The offline data is automatically grabbed immediately after a road map content download finishes & is stored in the SDK permanent cache.

    Declaration

    Objective-C

    - (void)enableSocialReportsOfflineDataGrabber;

    Swift

    func enableSocialReportsOfflineDataGrabber()
  • Disables the offline data grabber for the social reports overlay.

    Declaration

    Objective-C

    - (void)disableSocialReportsOfflineDataGrabber;

    Swift

    func disableSocialReportsOfflineDataGrabber()
  • Check if the offline data grabber for the social reports overlay is enabled.

    Declaration

    Objective-C

    - (BOOL)isSocialReportsOfflineDataGrabberEnabled;

    Swift

    func isSocialReportsOfflineDataGrabberEnabled() -> Bool
  • Check if the offline data grabber for the social reports overlay is supported.

    Declaration

    Objective-C

    - (BOOL)isSocialReportsOfflineDataGrabberSupported;

    Swift

    func isSocialReportsOfflineDataGrabberSupported() -> Bool
  • Add new geographic area to monitor.

    Declaration

    Objective-C

    - (void)monitorArea:(nonnull GeographicAreaObject *)geoArea
                 areaId:(nonnull NSString *)identifier;

    Swift

    func monitorArea(_ geoArea: GeographicAreaObject, areaId identifier: String)

    Parameters

    geoArea

    The geographic area object.

    identifier

    The monitor area identifier.

  • Remove the given geographic area from monitor.

    Declaration

    Objective-C

    - (void)unmonitorArea:(nonnull GeographicAreaObject *)geoArea;

    Swift

    func unmonitorArea(_ geoArea: GeographicAreaObject)

    Parameters

    geoArea

    The geographic area object.

  • Remove the given geographic areas from monitor.

    Declaration

    Objective-C

    - (void)unmonitorAreas:(nonnull NSArray<NSString *> *)array;

    Swift

    func unmonitorAreas(_ array: [String])

    Parameters

    array

    The monitor area identifiers array.

  • Remove all geographic areas from monitor.

    Declaration

    Objective-C

    - (void)unmonitorAllAreas;

    Swift

    func unmonitorAllAreas()
  • Sets the alarm distance in meters.

    Declaration

    Objective-C

    - (void)setAlarmDistance:(double)distance;

    Swift

    func setAlarmDistance(_ distance: Double)
  • Returns the distance in meters for alarming.

    Declaration

    Objective-C

    - (double)getAlarmDistance;

    Swift

    func getAlarmDistance() -> Double
  • Select if alarms should be provided when navigating without route.

    Declaration

    Objective-C

    - (void)setMonitorWithoutRoute:(BOOL)state;

    Swift

    func setMonitorWithoutRoute(_ state: Bool)
  • Returns the status of the “alarming without route” flag .

    Declaration

    Objective-C

    - (BOOL)getMonitorWithoutRoute;

    Swift

    func getMonitorWithoutRoute() -> Bool
  • Set the alarm overspeed threshold value, in mps.

    Declaration

    Objective-C

    - (void)setOverSpeedThreshold:(double)threshold insideCityArea:(_Bool)inside;

    Swift

    func setOverSpeedThreshold(_ threshold: Double, insideCityArea inside: Bool)

    Parameters

    threshold

    Value in meters per second.

    inside

    Specify whether the given threshold is for inside city area or for outside city area.

  • Get the alarm overspeed threshold value, in mps

    Declaration

    Objective-C

    - (double)getOverSpeedThreshold:(BOOL)insideCityArea;

    Swift

    func getOverSpeedThreshold(_ insideCityArea: Bool) -> Double

    Parameters

    insideCityArea

    Specify whether the returned threshold is for inside city area or for outside city area.

  • Returns the alarm current reference position.

    Declaration

    Objective-C

    - (nullable PositionObject *)getReferencePosition;

    Swift

    func getReferencePosition() -> PositionObject?
  • Returns the list of crossed boundaries geographic area.

    Declaration

    Objective-C

    - (nonnull NSArray<GeographicAreaObject *> *)getCrossedBoundaries;

    Swift

    func getCrossedBoundaries() -> [GeographicAreaObject]
  • Returns the list of active landmark alarms. @details When all alarms become inactive the list of landmark alarms is empty.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getLandmarkAlarms;

    Swift

    func getLandmarkAlarms() -> [LandmarkObject]
  • Returns the list of active overlay item alarms.

    Declaration

    Objective-C

    - (nonnull NSArray<OverlayItemObject *> *)getOverlayItemAlarms;

    Swift

    func getOverlayItemAlarms() -> [OverlayItemObject]
  • Returns the list of passed over overlay item alarms.

    Declaration

    Objective-C

    - (nonnull NSArray<OverlayItemObject *> *)getOverlayItemAlarmsPassedOver;

    Swift

    func getOverlayItemAlarmsPassedOver() -> [OverlayItemObject]
  • Returns the distance in meters from the overlay object item to the reference coordinate.

    Declaration

    Objective-C

    - (int)getDistanceWithOverlayItemObject:(nonnull OverlayItemObject *)object;

    Swift

    func getDistanceWith(_ object: OverlayItemObject) -> Int32

    Parameters

    object

    The overlay item object.

  • Returns the distance string formatted from the overlay object item to the reference coordinate.

    Declaration

    Objective-C

    - (nonnull NSString *)getDistanceFormattedWithOverlayItemObject:
        (nonnull OverlayItemObject *)object;

    Swift

    func getDistanceFormatted(with object: OverlayItemObject) -> String

    Parameters

    object

    The overlay item object.

  • Returns the distance unit string formatted from the overlay object item to the reference coordinate.

    Declaration

    Objective-C

    - (nonnull NSString *)getDistanceUnitFormattedWithOverlayItemObject:
        (nonnull OverlayItemObject *)object;

    Swift

    func getDistanceUnitFormatted(with object: OverlayItemObject) -> String

    Parameters

    object

    The overlay item object.

  • Register for safety camera notifications.

    Declaration

    Objective-C

    - (void)registerSafetyCameraNotificationsWithCompletionHandler:
        (nonnull void (^)(BOOL))handler;

    Swift

    func registerSafetyCameraNotifications() async -> Bool
  • Register for social report notifications.

    Declaration

    Objective-C

    - (void)registerSocialReportNotificationsWithCompletionHandler:
        (nonnull void (^)(BOOL))handler;

    Swift

    func registerSocialReportNotifications() async -> Bool