You can extract latitude and longitude from the location string you got from the server with regex. Like this:
Double latitude = 0., longitude = 0.;
//your location
String location = "lat/long: (28.6988812,77.1153696)";
//pattern
Pattern pattern = Pattern.compile("lat/long: \\(([0-9.]+),([0-9.]+)\\)$");
Matcher matcher = pattern.matcher(location);
if (matcher.matches()) {
latitude = Double.valueOf(matcher.group(1));
longitude = Double.valueOf(matcher.group(2));
}
if you need a Location object:
Location targetLocation = new Location("");//provider name is unnecessary
targetLocation.setLatitude(latitude);//your coords of course
targetLocation.setLongitude(longitude);
thanks to this answer