title: How can I get travel time between two location on google map in android?
body: <p>I can get distance between two location using direction api and this method</p>
  
  <p>My code is for get distance:</p>
  
  <pre><code> @Override
    public void onDirectionSuccess(Direction direction, String rawBody) {
      if (getActivity() != null) {
          if (direction.isOK()) {
              ArrayList&lt;LatLng&gt; directionPositionList = 
    direction.getRouteList().get(0).getLegList().get(0).getDirectionPoint();
  
   myMap.addPolyline(DirectionConverter.createPolyline(getActivity(), 
   directionPositionList, 5, Color.RED));
              myMap.addMarker(new MarkerOptions().position(new 
   LatLng(origin.latitude, origin.longitude)).title("Pickup 
   Location").snippet(pickup_address).
   icon(BitmapDescriptorFactory.defaultMarker
   (BitmapDescriptorFactory.HUE_RED)));
    myMap.addMarker(new MarkerOptions().position(new 
   LatLng(destination.latitude, destination.longitude))
  .title("Drop Location").snippet(drop_address).icon
  (BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));
              myMap.animateCamera(CameraUpdateFactory.newLatLngZoom(origin, 
  10));
  
    calculateDistance(Double.valueOf(direction.getRouteList()
   .get(0).getLegList().get(0).getDistance().getValue()) / 1000);
  </code></pre>
  
  <p>How can I get travel time using direction api in google map in android ?</p>