Get Trip Summary (Android)

Explore how to get the summary of a trip on Android with Trips v2.

To get a summary of the trip anytime, you can use the Roam.getTripSummary("tripId") method by passing the tripID.

Roam.getTripSummary("tripId", new RoamTripCallback() {
                    @Override
                    public void onSuccess(RoamTripResponse response) {
                       //get active trip summary details
                    }

                    @Override
                    public void onError(Error error) {
                      //get error details
                    }
                });

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

You don't need to mention if the trip is local trip with a boolean value. The getTripSummary() method will check that for you and return the trip details accordingly.

Last updated