I have data in this format:
POINT(73.0166738279393 33.6788721326803)
MULTILINESTRING((73.0131224998036 33.679001500419,73.0119635003153 33.678392400389,73.01
Try this ,
String str;
ArrayList coordinates = new ArrayList();
First get string from textview.
str = textview.getText().toString();
Second remove brackets.
str = str.replaceAll("\\(", "");
str = str.replaceAll("\\)", "");
Then split with comma and add values to arraylist.
String[] commatokens = str.split(",");
for (String commatoken : commatokens) {
System.out.println("-" + commatoken + "-");
coordinates.add(commatoken);
}
Then we get separate coordinates value at index position ,
for (int i = 0; i < coordinates.size(); i++) {
String[] tokens = coordinates.get(i).split("\\s");
for (String token : tokens) {
System.out.println("-" + token + "-");
}
}