# \*Tracking Status

Check Tracking status with next\
Objective-c:

```
[RPTracker instance].isActive
```

Detect state changes with Notification:\
Objective-c:

```
[[NSNotificationCenter defaultCenter]
     addObserver:self
     selector:@selector(observeTracker)
     name:RPTrackerDidChangeActivityNotification
     object:nil];
```

and Observer\
Objective-c:

```
- (void)observeTracker {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        self.startButton.enabled = ![RPTracker instance].isActive;
        self.stopButton.enabled = [RPTracker instance].isActive;
        
        if ([RPTracker instance].isActive) {
            self.tokenLabel.text = @"tracking is active";
        } else {
            self.tokenLabel.text = @"tracking is not active";
        }
    });
}
```

Detect state changes with Delegate:\
**RPTrackingStateListenerDelegate**\
Objective-c:

```
@interface AppDelegate () <RPSpeedLimitDelegate, RPTrackingStateListenerDelegate> {
    
}

@end
```

Delegate Method\
Objective-c:

```
- (void)trackingStateChanged:(Boolean)state {
    NSLog(@"tracking state changed to %hhu", state);
}
```

### Start / Stop Tracking&#x20;

Manual start and stop tracking don't switch off automatic start / stop tracking. For manual start track you could use:

```
[[RPTracker instance] startTracking];
```

For manual stop track you could use:

```
[[RPTracker instance] stopTracking];
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-old.telematicssdk.com/sdk-installation/ios-sdk-intallation/tracking-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
