Reputation: 14828
I have a method
String Address=search.getText().toString();
private String getAddressUrl() {
String mapUrl="http://maps.googleapis.com/maps/api/geocode/json?";
String add=Address; //Address is a String input by the user
String baseUrl1=mapUrl+"address="+add+"&sensor=true";
return baseUrl1;
}
If I input the string like "170 william street New York, NY" I am getting illegal character at query error because it contains spaces.
Is there any method to insert %20 for spaces in Address
string
Upvotes: 0
Views: 254