I used the method used on that link to show a route between two GeoPoints :
Why retrieving Google Directions for Android using KML data is not working anymore?
I would like to know if there’s a way to get a walking route instead of the driving route.
You require mode parameter value in your URL.
Check out here, different parameters which can be append to URL.
For providing Mode value in URL your have only 4 mode supported.
Supported mode value documented here.