I am trying to calculate the distance between two map point using Google Map in android. I have used two lat long value to put two map pin and also able to draw a route betw
You probably want to use the Google Directions API to known the real distances between two GPS locations. If you want the "crow-fly" distance, Sheikh's answer is perfect.
The easiest way to get a crow-flies distance between two locations is in android.location.Location. The static function distanceBetween will do what you want.
http://developer.android.com/reference/android/location/Location.html
(I do not know how to reply to a post, but I want to say for anyone viewing this thread after the fact that Sheikh's "dirty" answer is not correct; he is calculating the rectangular distance, which will vary from the correct answer depending on where you are on the globe. If you REALLY want to do the math yourself, you need to use this: http://www.movable-type.co.uk/scripts/latlong.html . But you don't really want to do the math yourself. Really.)
I was also in a situation like this some days ago, and believe me, its such a headache.
Still, I feel following links will help you:
I hope it helps a bit.