akexorcist / GoogleDirectionLibrary

[Android] Library for Google Direction API for Google Maps Android API v2
Apache License 2.0
571 stars 174 forks source link

Works Perfect. But how to get Travel Time #12

Closed sivabe35 closed 8 years ago

akexorcist commented 8 years ago

You can get total travel time from each leg (Any route may have more than one way. Each way it's called leg) by

Info distanceInfo = leg.getDistance(); Info durationInfo = leg.getDuration(); String distance = distanceInfo.getText(); String duration = durationInfo.getText();

I already described in this article : http://www.akexorcist.com/2015/12/google-direction-library-for-android-en.html

sivabe35 commented 8 years ago

akexorcist thank you so much :)