Reputation: 91
i have a url link am trying to send to my user, but the link breaks up cause. it sends the full link but about half of it is not underlined as a link. this is what am trying to send
String locateUrl="http://maps.google.com?q="+latitude()+","+longitude();
first it does not recognize this ?q= as a link and it just breaks up from there, have checked other answers and tried them but seems not to be working
Upvotes: 0
Views: 2623
Reputation: 91
Just solved this by putting "/" before ?q= thereby making sure the link doesn't break full link will then be
String locateUrl="http://maps.google.com/?q="+latitude()+","+longitude();
Upvotes: 3
Reputation: 3798
Your link may be breaking because of space at the beginning or in between trim it and then use it.
String locateUrl="http://maps.google.com?q="+latitude()+","+longitude();
locateUrl = locateUrl.trim();
Upvotes: 0