代码之家  ›  专栏  ›  技术社区  ›  user6008330

未发送带有GoogleMaps链接的短信

  •  0
  • user6008330  · 技术社区  · 7 年前

    我使用GoogleMaps链接发送短信,但在某些情况下,手机不发送,我不知道原因,其他链接正常发送。

    以下是消息的图像: enter image description here

    String uri = "http://maps.google.com/maps?q=" + lat + "," + lng;
        if (!preferences.getNumber(activity).equals("")) {
            smsBody.append(Uri.parse(uri));
            String phone1 = preferences.getNumber(activity);
            try {
                smsManager.sendTextMessage(phone1, null, msgASerEnviada, null, null);
                smsManager.sendTextMessage(phone1, null, smsBody.toString(), null, null);//mensagem com o link
                Toast.makeText(activity, "Sent to " + phone1, Toast.LENGTH_SHORT).show();
            } catch (Exception e) {
                e.printStackTrace();
                Toast.makeText(activity, "Something wrong", Toast.LENGTH_SHORT);
            }
        }
    
    1 回复  |  直到 7 年前
        1
  •  1
  •   user6008330 user6008330    7 年前

    通过删除http解决://