NMLocationManager Class Reference
| 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.
Note: 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
-
+ desiredAccuracyThe 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.
-
+ distanceFilterSpecifies 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.
-
+ startLocationTrackingStarts tracking the position of the device.
-
+ stopLocationTrackingStops tracking the position of the device.
-
+ recentLocationLast 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)desiredAccuracyReturn 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.hdistanceFilter
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)distanceFilterReturn 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.hrecentLocation
Last location of the device.
+ (CLLocation *)recentLocationDiscussion
Last location of the device.
Declared In
NMLocationManager.hsetDesiredAccuracy:
Sets the desiredAccuracy option of location manager.
+ (void)setDesiredAccuracy:(CLLocationAccuracy)accuracyParameters
- accuracy
Enum value for desired accuracy.
Discussion
Sets the desiredAccuracy option of location manager.
Declared In
NMLocationManager.hsetDistanceFilter:
Sets the distanceFilter option of location manager.
+ (void)setDistanceFilter:(CLLocationDistance)distanceParameters
- distance
Value in meters for distance filter.
Discussion
Sets the distanceFilter option of location manager.
Declared In
NMLocationManager.h