@Uday, the plotting of polyline and calculating the direction between two locations can be done using Google Maps Directions API.
The Google Maps Directions API is a service that calculates directions between locations using an HTTP request.
In this tutorial, you'll see how to use Google Direction API and Places API. It will also guide you on the implementation of API and Google HTTP Client Library for Java. For the ETA and distance between the markers Google Direction response has an object called Distance and Duration within "LEGS" array:
A DirectionsLeg defines a single leg of a journey from the origin to
the destination in the calculated route. For routes that contain no
waypoints, the route will consist of a single "leg," but for routes
that define one or more waypoints, the route will consist of one or
more legs, corresponding to the specific legs of the journey.
distance indicates the total distance covered by this leg, as a Distance object
duration indicates the total duration of this leg, as a Duration object
Here is a related SO question about travel time. It explains how to get the duration of each leg and distance until the end marker point and how to parse the distance and duration in your app.