0
I work with sending SMS with the Googlemaps link, but in some cases, the phone does not send, I can not know the reason, other links are sent normally.
Follow the image of the message:
I would like a help to resolve this issue. And, important, the idea of using SMS is not to be mandatory the internet.
Follow the code I use for generation:
String uri = "http://maps.google.com/maps?q=" + latitude + "," + longitude;
if (!preferences.getNumber(activity).equals("")) {
smsBody.append(Uri.parse(uri));
String telefone1 = preferences.getNumber(activity);
try {
smsManager.sendTextMessage(telefone1, null, msgASerEnviada, null, null);
smsManager.sendTextMessage(telefone1, null, smsBody.toString(), null, null);//mensagem com o link
Toast.makeText(activity, "Mensagem enviada para " + telefone1, Toast.LENGTH_SHORT).show();
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(activity, "Há algo errado, por favor verifique o número enviado", Toast.LENGTH_SHORT);
}
}//Na edição foi adicionada mais uma barra.