#import <SENSiOSGpsDelegate.h>
Inherits NSObject, and <CLLocationManagerDelegate>.
Definition at line 6 of file SENSiOSGpsDelegate.h.
◆ askPermission
Definition at line 7 of file SENSiOSGpsDelegate.mm.
47 if ([
_locationManager respondsToSelector:
@selector(requestWhenInUseAuthorization)])
49 [_locationManager requestWhenInUseAuthorization];
CLLocationManager * _locationManager
◆ init
◆ locationManager:didChangeAuthorizationStatus:
| - (void) locationManager: |
|
(CLLocationManager*) |
manager |
| didChangeAuthorizationStatus: |
|
(CLAuthorizationStatus) |
status |
|
|
| |
|
implementation |
Definition at line 7 of file SENSiOSGpsDelegate.mm.
111 :(CLLocationManager*)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status
114 if (status == kCLAuthorizationStatusAuthorizedAlways ||
115 status == kCLAuthorizationStatusAuthorizedWhenInUse)
123 _permissionCB(
false);
◆ locationManager:didFailWithError:
| - (void) locationManager: |
|
(CLLocationManager*) |
manager |
| didFailWithError: |
|
(NSError*) |
error |
|
|
| |
|
implementation |
Definition at line 7 of file SENSiOSGpsDelegate.mm.
98 :(CLLocationManager*)manager didFailWithError:(NSError*)error
104 if ([error code] != kCLErrorLocationUnknown)
106 printf(
"**** locationManager didFailWithError ****\n");
◆ locationManager:didUpdateToLocation:fromLocation:
| - (void) locationManager: |
|
(CLLocationManager*) |
manager |
| didUpdateToLocation: |
|
(CLLocation*) |
newLocation |
| fromLocation: |
|
(CLLocation*) |
oldLocation |
|
|
| |
|
implementation |
Definition at line 7 of file SENSiOSGpsDelegate.mm.
80 :(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation*)oldLocation
85 if (newLocation.horizontalAccuracy > 0.0)
90 _updateCB(newLocation.coordinate.latitude,
91 newLocation.coordinate.longitude,
93 newLocation.horizontalAccuracy);
◆ setupLocationManager
| - (void) setupLocationManager |
|
|
|
|
implementation |
Starts the location data update if the interval time > 0 else it stops.
Definition at line 7 of file SENSiOSGpsDelegate.mm.
◆ start
Starts the location data update.
Definition at line 7 of file SENSiOSGpsDelegate.mm.
61 [_locationManager startUpdatingLocation];
63 printf(
"Starting Location Manager\n");
◆ stop
Stops the location data update.
Definition at line 7 of file SENSiOSGpsDelegate.mm.
74 [_locationManager stopUpdatingLocation];
76 printf(
"Stopping Location Manager\n");
◆ _locationManager
| - (CLLocationManager*) _locationManager |
|
private |
◆ _running
◆ permissionCB
| - (function<void(bool)>) SENSiOSGpsDelegate: |
|
readwritenonatomicassign |
◆ updateCB
| - (function<void(double, double, double, double)>) SENSiOSGpsDelegate: |
|
readwritenonatomicassign |
The documentation for this class was generated from the following files: