First we will hit google directions url using our start and end latitute and longitude. After that we will read xml content on that webpage and parse in our app using xml parser. And then we will fetch list of latitude and longitude from that webpage and display on google map on android.
below is code:
After creating above file you can use below methods to get locations and display on google map.
The sourcePosition, destPosition are from the LatLng type, and you give them the wanted points.