0

I'm trying to execute an URL that will pass two parameters of location coordinates that include a comma (",") but the url is being fetched differently (without the comma) therefore the webservice is returning null.

new JSONTask2().execute("http://server/WEService.svc/sendloc/56/39,911437/32,809107"); 

1 Answer 1

1

You can use %2c in the URL to replace the commas.

With your URL being dynamic, you can use url = url.replace(",", "%2c");

Sign up to request clarification or add additional context in comments.

2 Comments

but the location will be a variable so i can not do that. the url is just an example
I updated my answer to explain how you can replace a part of a string.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.