Get Active Trips (Android)

Explore how to get a user's active trips on Android with Trips v2.

To get the users' active trips, you can use the Roam.getActiveTrips(isLocal) method where the value of isLocal is boolean. The value being true returns all the local trips and value being false, returns all active trips created on the server side.

Roam.getActiveTrips(isLocal,new RoamActiveTripsCallback() {
           @Override
           public void onSuccess(RoamActiveTripsResponse response) {
             //get active trips details
           }

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

The Get Active trips method returns all the trips in the form of a list. The parameters and responses are similar to those of the createTrip() method.

Last updated