So here's my problem.
I have a Timer which is supposed to send a SMS every X seconds. And i want the text message to be the current GPS location of the user. So, i want to send a kind of Google Maps URL, using the GPS coordinates i get, and adding some markers, maptype, size.... for the map.
To do that, i need to use the character "&" in the URL. In order to get something like that : http://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&maptype=roadmap
(ie : https://developers.google.com/maps/documentation/staticmaps/?csw=1#URL_Parameters)
But, when i want to use this kind of URL, using "&" in my text message of the SMS. The SMS is never sent. When i remove every part containing the "&", it's working fine.
I tried to use "& ;" instead of "&". Still doesn't work.
Here's my SMS manager to send the SMS :
smsManager.sendTextMessage(INT, null, "Alert - RED AREA \n TIME : " + current date + " \n Lat: " + latitude + " \n Long: " + longitude + "Link Maps : http://maps.googleapis.com/maps/api/staticmap?center=" + latitude + "," + longitude +"&zoom=12&size=400x400&maptype=satellite", null, null);
The code above, doesn't send any messages. But this one does :
smsManager.sendTextMessage(INT, null, "Alert - RED AREA \n TIME : " + current date + " \n Lat: " + latitude + " \n Long: " + longitude + "Link Maps : http://maps.googleapis.com/maps/api/staticmap?center=" + latitude + "," + longitude, null, null);
Any ideas ?
Thanks !