Update Trip (Android)

Explore how to update a trip on Android with Trips v2.

The Update Trip method allows you to update your trip details at any point in time. However, you can update the stop locations as long as the trip has not started. You need to create a new object or update the existing trip, assign it with the RoamTrip() class and pass the trip object to Roam.updateTrip(trip).

Since the updateTrip method updates the existing trip, you need to pass the tripId to the trip object where the tripId is the unique identifier for your trip.

 Roam.updateTrip(trip, new RoamTripCallback() {
                    public void onSuccess(RoamTripResponse response) {
                       //get trip details

                    public void onError(Error error) {
                      //get error details

The trip response and its parameters are similar to those of the createTrip() method.

There's no need to exclusively specify if the trip is local using a boolean value. The updateTrip() method will check that for you and update the trip details accordingly.

Last updated