Android Google Maps draw a path between two points
<p>I would like to draw a path between two points and calculate how much time it will take to move from A to B. I have thought that it is trivial task for Google Maps API.</p>

<p>Everything that I found is small snippet about <code>PolyUtil</code> in <a href="https://developers.google.com/maps/documentation/android-api/utility/" rel="nofollow noreferrer">documentation</a> and nothing about how to use it.</p>

<p>What I did ?</p>

<p>Inside <code>MapsActivity</code> in <code>onMapReady</code> method I'm trying to create an encoded path:</p>

<pre><code>List&lt;LatLng&gt; latLngList = new ArrayList&lt;&gt;();
latLngList.add(new LatLng(56.952503, 24.083719));
latLngList.add(new LatLng(55.877526, 26.533898));

String encodedPath = PolyUtil.encode(latLngList);
</code></pre>

<p>But what is the next ? How to draw this path on map ? How to calculate car/walking distance between this points ?</p>