# Listeners

To keep developers using the GIZO SDK informed about the status of the services within the SDK, the following listeners have been provided. The events triggering these listeners are inherited from the GizoDelegate.&#x20;

## Retrieving the Last Location

To get the last GPS location returned by the device, the following listener can be used:

```swift
public func didUpdateLocation(location: CLLocation) {
    print("Latitude: \(latitude), Longitude: \(longitude), Timestamp: \(timestamp)");
}
```

## Start of a Recording

The listener below notifies you when a new recording starts, whether triggered automatically or manually.

```swift
public func didStartRecording() {
    print("Recording started")
}
```

## End of a Recording

The listener below notifies you when a new recording stops, regardless of whether it is terminated automatically or manually.

```swift
public func didStopRecording() {
    print("Recording stoped")
}
```

## Start of Upload to GIZO Platform

The listener below informs you about the initiation of the process for uploading the recorded trips to the GIZO platform.

```swift
public func onStartUploadTrip(tripId: Int64) {
    print("onStartUploadTrip \(tripId)")
}
```

## End of Upload to GIZO Platform

The listener below informs you about the end of the upload process once the trip data has been successfully uploaded to the GIZO platform.

```swift
public func onCompleteUploadTrip(tripId: Int64) {
    print("onCompleteUploadTrip \(tripId)")
}
```

## Detection of a Crash

Once a crash is detected, the following listener provides some preliminary information on the accident.

```swift
public func onDetectedCrash(crashDetected: CrashDetected) {
    print("onDetectedCrash - time: \(time), latitude: \(latitude), longitude: \(longitude), speed: \(speed), acceleration: \(acceleration), severity: \(severity), uniqueId: \(uniqueid)")
}
```

## End of Upload of a Crash of to the GIZO Platform

The following listener returns an event once a detected crash is uploaded.

```swift
public func onUploadedCrash(crashUploaded: CrashUploaded) {
    print("Crash Uploaded - id: \(id), time: \(time), latitude: \(latitude), longitude: \(longitude), speed: \(speed), acceleration: \(acceleration), severity: \(severity), uniqueId: \(uniqueid)")
}
```


---

# 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.artificient.de/usage/ios/listeners.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.
