GoogleRidesharingDriver Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTDDeliveryVehicleReporter
Object for sending information to the Fleet Engine backend. Used for deliveries.
-
Updates the remaining VehicleStops for the vehicle. Results are reflected asynchronously in
remainingVehicleStops
. The vehicle is expected to visit the stops in the same order as the
array.
Parameters
vehicleStops
|
The ordered array of GMTDVehicleStop objects the vehicle will visit. This
must be non-nil and all stops other than the first stop must have a state of
GMTDVehicleStopStateNew .
|
completion
|
A block to run after the stops have been updated.
|
-
Updates the state of the first GMTDVehicleStop
in remainingVehicleStops
to GMTDVehicleStopStateEnroute
. remainingVehicleStops
must contain at least one stop when
this function is called.
Parameters
completion
|
A block to run after the stops have been updated.
|
-
Updates the state of the first GMTDVehicleStop
in remainingVehicleStops
to
GMTDVehicleStopStateArrived
. remainingVehicleStops
must contain at least one stop when this
function is called.
Parameters
completion
|
A block to run after the stops have been updated.
|
-
Removes the first GMTDVehicleStop
in remainingVehicleStops
. remainingVehicleStops
must
contain at least one stop when this function is called.
Parameters
completion
|
A block to run after the stops have been updated.
|
-
Gets the remaining GMTDVehicleStop
objects that the vehicle still needs to visit.
Parameters
completion
|
A completion to run with the retrieved GMTDVehicleStop objects.
The completion will be run asynchronously on the main thread.
|
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-01-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-21 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMTDDeliveryVehicleReporter\u003c/code\u003e is an object used to send delivery-related information to the Fleet Engine backend.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetVehicleStops\u003c/code\u003e method updates the remaining vehicle stops, requiring a non-nil, ordered array of \u003ccode\u003eGMTDVehicleStop\u003c/code\u003e objects, with all stops after the first one having a state of \u003ccode\u003eGMTDVehicleStopStateNew\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eMethods \u003ccode\u003ereportEnrouteToNextStopWithCompletion\u003c/code\u003e, \u003ccode\u003ereportArrivedAtStopWithCompletion\u003c/code\u003e, and \u003ccode\u003ereportCompletedStopWithCompletion\u003c/code\u003e update the state or remove the first \u003ccode\u003eGMTDVehicleStop\u003c/code\u003e in \u003ccode\u003eremainingVehicleStops\u003c/code\u003e, which must contain at least one stop when these are called.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetRemainingVehicleStopsWithCompletion\u003c/code\u003e retrieves the \u003ccode\u003eGMTDVehicleStop\u003c/code\u003e objects that represent the vehicle's pending stops.\u003c/p\u003e\n"]]],["The `GMTDDeliveryVehicleReporter` object sends delivery information to the Fleet Engine backend. It allows updating and managing vehicle stops. Key actions include: `setVehicleStops` to update the remaining stops, requiring a non-nil, ordered array where all but the first stop are in `GMTDVehicleStopStateNew`; `reportEnrouteToNextStop` to set the first stop's state to `GMTDVehicleStopStateEnroute`; `reportArrivedAtStop` to set the first stop's state to `GMTDVehicleStopStateArrived`; and `reportCompletedStop` to remove the first stop. `getRemainingVehicleStops` retrieves the vehicle's remaining stops.\n"],null,["# GoogleRidesharingDriver Framework Reference\n\nGMTDDeliveryVehicleReporter\n===========================\n\n @interface GMTDDeliveryVehicleReporter : ../Classes/GMTDVehicleReporter.html\n\nObject for sending information to the Fleet Engine backend. Used for deliveries.\n- `\n ``\n ``\n `\n\n ### [-setVehicleStops:completion:](#/c:objc(cs)GMTDDeliveryVehicleReporter(im)setVehicleStops:completion:)\n\n `\n ` \n Updates the remaining VehicleStops for the vehicle. Results are reflected asynchronously in\n `remainingVehicleStops`. The vehicle is expected to visit the stops in the same order as the\n array. \n\n #### Declaration\n\n Swift \n\n func setVehicleStops(_ vehicleStops: [../Classes/GMTDVehicleStop.html]) async throws -\u003e [../Classes/GMTDVehicleStop.html]\n\n Objective-C \n\n - (void)setVehicleStops:(nonnull NSArray\u003c../Classes/GMTDVehicleStop.html *\u003e *)vehicleStops\n completion:\n (nonnull ../Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;\n\n #### Parameters\n\n |----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*vehicleStops*` ` | The ordered array of [GMTDVehicleStop](../Classes/GMTDVehicleStop.html) objects the vehicle will visit. This must be non-nil and all stops other than the first stop must have a state of `GMTDVehicleStopStateNew`. |\n | ` `*completion*` ` | A block to run after the stops have been updated. |\n\n- `\n ``\n ``\n `\n\n ### [-reportEnrouteToNextStopWithCompletion:](#/c:objc(cs)GMTDDeliveryVehicleReporter(im)reportEnrouteToNextStopWithCompletion:)\n\n `\n ` \n Updates the state of the first [GMTDVehicleStop](../Classes/GMTDVehicleStop.html) in `remainingVehicleStops`\n to `GMTDVehicleStopStateEnroute`. `remainingVehicleStops` must contain at least one stop when\n this function is called. \n\n #### Declaration\n\n Swift \n\n func reportEnrouteToNextStop() async throws -\u003e [../Classes/GMTDVehicleStop.html]\n\n Objective-C \n\n - (void)reportEnrouteToNextStopWithCompletion:\n (nonnull ../Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;\n\n #### Parameters\n\n |--------------------|---------------------------------------------------|\n | ` `*completion*` ` | A block to run after the stops have been updated. |\n\n- `\n ``\n ``\n `\n\n ### [-reportArrivedAtStopWithCompletion:](#/c:objc(cs)GMTDDeliveryVehicleReporter(im)reportArrivedAtStopWithCompletion:)\n\n `\n ` \n Updates the state of the first [GMTDVehicleStop](../Classes/GMTDVehicleStop.html) in `remainingVehicleStops` to\n `GMTDVehicleStopStateArrived`. `remainingVehicleStops` must contain at least one stop when this\n function is called. \n\n #### Declaration\n\n Swift \n\n func reportArrivedAtStop() async throws -\u003e [../Classes/GMTDVehicleStop.html]\n\n Objective-C \n\n - (void)reportArrivedAtStopWithCompletion:\n (nonnull ../Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;\n\n #### Parameters\n\n |--------------------|---------------------------------------------------|\n | ` `*completion*` ` | A block to run after the stops have been updated. |\n\n- `\n ``\n ``\n `\n\n ### [-reportCompletedStopWithCompletion:](#/c:objc(cs)GMTDDeliveryVehicleReporter(im)reportCompletedStopWithCompletion:)\n\n `\n ` \n Removes the first [GMTDVehicleStop](../Classes/GMTDVehicleStop.html) in `remainingVehicleStops`. `remainingVehicleStops` must\n contain at least one stop when this function is called. \n\n #### Declaration\n\n Swift \n\n func reportCompletedStop() async throws -\u003e [../Classes/GMTDVehicleStop.html]\n\n Objective-C \n\n - (void)reportCompletedStopWithCompletion:\n (nonnull ../Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;\n\n #### Parameters\n\n |--------------------|---------------------------------------------------|\n | ` `*completion*` ` | A block to run after the stops have been updated. |\n\n- `\n ``\n ``\n `\n\n ### [-getRemainingVehicleStopsWithCompletion:](#/c:objc(cs)GMTDDeliveryVehicleReporter(im)getRemainingVehicleStopsWithCompletion:)\n\n `\n ` \n Gets the remaining [GMTDVehicleStop](../Classes/GMTDVehicleStop.html) objects that the vehicle still needs to visit. \n\n #### Declaration\n\n Swift \n\n func remainingVehicleStops() async throws -\u003e [../Classes/GMTDVehicleStop.html]\n\n Objective-C \n\n - (void)getRemainingVehicleStopsWithCompletion:\n (nonnull ../Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;\n\n #### Parameters\n\n |--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*completion*` ` | A completion to run with the retrieved [GMTDVehicleStop](../Classes/GMTDVehicleStop.html) objects. The completion will be run asynchronously on the main thread. |"]]