SMS with Googlemaps link is not sent

Asked

Viewed 70 times

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: inserir a descrição da imagem aqui

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.

1 answer

0


Solved by removing the http: //

Browser other questions tagged

You are not signed in. Login or sign up in order to post.