Inherits from NSObject
Declared in NMLocationManager.h
NMLocationManager.m

Overview

NMLocationManager is a service that enables developers to location tracking for push notifications. If you want to send locational push notifications and if you use this service you do not need to track device locations. This service automatically updates device location. When your users get closer to specific location, you can send automated push messages to them in certain time interval. It is recommended to use this class when high-precision location data is required. However, if just regular position updates are enough for the application, Netmera SDK default location tracking mechanism is more than enough; otherwise, the parameters of this service should be configured in a way that minimizes its impact on battery life.

Tasks

  • + desiredAccuracy

    The desired location accuracy. The location service will try its best to achieve your desired accuracy. However, it is not guaranteed. To optimize power performance, be sure to specify an appropriate accuracy for your usage scenario (eg, use a large accuracy value when only a coarse location is needed). Use kCLLocationAccuracyBest to achieve the best possible accuracy. Use kCLLocationAccuracyBestForNavigation for navigation. By default, kCLLocationAccuracyHundredMeters is used.

  • + setDesiredAccuracy:

    Sets the desiredAccuracy option of location manager.

  • + distanceFilter

    Specifies the minimum update distance in meters. Client will not be notified of movements of less than the stated value, unless the accuracy has improved. Pass in kCLDistanceFilterNone to be notified of all movements. By default, 10 meters is used.

  • + setDistanceFilter:

    Sets the distanceFilter option of location manager.

  • + startLocationTracking

    Starts tracking the position of the device.

  • + stopLocationTracking

    Stops tracking the position of the device.

  • + recentLocation

    Last location of the device.

Class Methods

desiredAccuracy

The desired location accuracy. The location service will try its best to achieve your desired accuracy. However, it is not guaranteed. To optimize power performance, be sure to specify an appropriate accuracy for your usage scenario (eg, use a large accuracy value when only a coarse location is needed). Use kCLLocationAccuracyBest to achieve the best possible accuracy. Use kCLLocationAccuracyBestForNavigation for navigation. By default, kCLLocationAccuracyHundredMeters is used.

+ (CLLocationAccuracy)desiredAccuracy

Return Value

Current desiredAccuracy of location service.

Discussion

The desired location accuracy. The location service will try its best to achieve your desired accuracy. However, it is not guaranteed. To optimize power performance, be sure to specify an appropriate accuracy for your usage scenario (eg, use a large accuracy value when only a coarse location is needed). Use kCLLocationAccuracyBest to achieve the best possible accuracy. Use kCLLocationAccuracyBestForNavigation for navigation. By default, kCLLocationAccuracyHundredMeters is used.

Declared In

NMLocationManager.h

distanceFilter

Specifies the minimum update distance in meters. Client will not be notified of movements of less than the stated value, unless the accuracy has improved. Pass in kCLDistanceFilterNone to be notified of all movements. By default, 10 meters is used.

+ (CLLocationDistance)distanceFilter

Return Value

Current distanceFilter of location service.

Discussion

Specifies the minimum update distance in meters. Client will not be notified of movements of less than the stated value, unless the accuracy has improved. Pass in kCLDistanceFilterNone to be notified of all movements. By default, 10 meters is used.

Declared In

NMLocationManager.h

recentLocation

Last location of the device.

+ (CLLocation *)recentLocation

Discussion

Last location of the device.

Declared In

NMLocationManager.h

setDesiredAccuracy:

Sets the desiredAccuracy option of location manager.

+ (void)setDesiredAccuracy:(CLLocationAccuracy)accuracy

Parameters

accuracy

Enum value for desired accuracy.

Discussion

Sets the desiredAccuracy option of location manager.

Declared In

NMLocationManager.h

setDistanceFilter:

Sets the distanceFilter option of location manager.

+ (void)setDistanceFilter:(CLLocationDistance)distance

Parameters

distance

Value in meters for distance filter.

Discussion

Sets the distanceFilter option of location manager.

Declared In

NMLocationManager.h

startLocationTracking

Starts tracking the position of the device.

+ (void)startLocationTracking

Discussion

Starts tracking the position of the device.

Declared In

NMLocationManager.h

stopLocationTracking

Stops tracking the position of the device.

+ (void)stopLocationTracking

Discussion

Stops tracking the position of the device.

Declared In

NMLocationManager.h