我使用GoogleMaps链接发送短信,但在某些情况下,手机不发送,我不知道原因,其他链接正常发送。
以下是消息的图像:
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);
Toast.makeText(activity, "Sent to " + phone1, Toast.LENGTH_SHORT).show();
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(activity, "Something wrong", Toast.LENGTH_SHORT);
}
}