GoogleRidesharingDriver Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTDVehicleReporterListener
@protocol GMTDVehicleReporterListener <NSObject>
Protocol for responding to periodic vehicle updates sent by GMTDVehicleReporter
.
-
Informs the listeners that the Fleet Engine backend successfully received the vehicle location
and state update.
Parameters
vehicleReporter
|
|
vehicleUpdate
|
Contains the current location and state of the vehicle.
|
-
Informs the listeners that a vehicle update failed. As long as location tracking is enabled,
GMTDVehicleReporter
continues to send the latest data to the Fleet Engine backend.
If location tracking is disabled and this is for updating the vehicle state to OFFLINE, the
developer can call -updateVehicleState:
with GMTDVehicleStateOffline
to trigger one-off
updates.
Declaration
Objective-C
- (void)vehicleReporter:(nonnull GMTDVehicleReporter *)vehicleReporter
didFailVehicleUpdate:(nonnull GMTDVehicleUpdate *)vehicleUpdate
withError:(nonnull NSError *)error;
Parameters
vehicleReporter
|
|
vehicleUpdate
|
Contains the current location and state of the vehicle.
|
error
|
Indicates the reason that an error occurred.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMTDVehicleReporterListener\u003c/code\u003e is a protocol that allows for monitoring periodic vehicle updates sent by \u003ccode\u003eGMTDVehicleReporter\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evehicleReporter:didSucceedVehicleUpdate:\u003c/code\u003e method notifies listeners when a vehicle's location and state update is successfully received by the Fleet Engine backend.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evehicleReporter:didFailVehicleUpdate:withError:\u003c/code\u003e method informs listeners of a failed vehicle update, with continued attempts to update while tracking is enabled.\u003c/p\u003e\n"],["\u003cp\u003eBoth success and failure methods provide the \u003ccode\u003eGMTDVehicleReporter\u003c/code\u003e instance that triggered the event and the current \u003ccode\u003eGMTDVehicleUpdate\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingDriver Framework Reference\n\nGMTDVehicleReporterListener\n===========================\n\n @protocol GMTDVehicleReporterListener \u003cNSObject\u003e\n\nProtocol for responding to periodic vehicle updates sent by [GMTDVehicleReporter](../Classes/GMTDVehicleReporter.html).\n- `\n ``\n ``\n `\n\n ### [-vehicleReporter:didSucceedVehicleUpdate:](#/c:objc(pl)GMTDVehicleReporterListener(im)vehicleReporter:didSucceedVehicleUpdate:)\n\n `\n ` \n Informs the listeners that the Fleet Engine backend successfully received the vehicle location\n and state update. \n\n #### Declaration\n\n Swift \n\n func vehicleReporter(_ vehicleReporter: ../Classes/GMTDVehicleReporter.html, didSucceed vehicleUpdate: ../Classes/GMTDVehicleUpdate.html)\n\n Objective-C \n\n - (void)vehicleReporter:(nonnull ../Classes/GMTDVehicleReporter.html *)vehicleReporter\n didSucceedVehicleUpdate:(nonnull ../Classes/GMTDVehicleUpdate.html *)vehicleUpdate;\n\n #### Parameters\n\n |-------------------------|----------------------------------------------------------------------------------------------------------------|\n | ` `*vehicleReporter*` ` | Indicates the instance of [GMTDVehicleReporter](../Classes/GMTDVehicleReporter.html) that generated the event. |\n | ` `*vehicleUpdate*` ` | Contains the current location and state of the vehicle. |\n\n- `\n ``\n ``\n `\n\n ### [-vehicleReporter:didFailVehicleUpdate:withError:](#/c:objc(pl)GMTDVehicleReporterListener(im)vehicleReporter:didFailVehicleUpdate:withError:)\n\n `\n ` \n Informs the listeners that a vehicle update failed. As long as location tracking is enabled,\n [GMTDVehicleReporter](../Classes/GMTDVehicleReporter.html) continues to send the latest data to the Fleet Engine backend.\n\n If location tracking is disabled and this is for updating the vehicle state to OFFLINE, the\n developer can call `-updateVehicleState:` with `GMTDVehicleStateOffline` to trigger one-off\n updates. \n\n #### Declaration\n\n Swift \n\n func vehicleReporter(_ vehicleReporter: ../Classes/GMTDVehicleReporter.html, didFail vehicleUpdate: ../Classes/GMTDVehicleUpdate.html, withError error: any Error)\n\n Objective-C \n\n - (void)vehicleReporter:(nonnull ../Classes/GMTDVehicleReporter.html *)vehicleReporter\n didFailVehicleUpdate:(nonnull ../Classes/GMTDVehicleUpdate.html *)vehicleUpdate\n withError:(nonnull NSError *)error;\n\n #### Parameters\n\n |-------------------------|----------------------------------------------------------------------------------------------------------------|\n | ` `*vehicleReporter*` ` | Indicates the instance of [GMTDVehicleReporter](../Classes/GMTDVehicleReporter.html) that generated the event. |\n | ` `*vehicleUpdate*` ` | Contains the current location and state of the vehicle. |\n | ` `*error*` ` | Indicates the reason that an error occurred. |"]]