我正在通過smsManager發送消息。但在一些三星手機無法發送,並且沒有顯示錯誤。消息不是通過smsManager在某些電話中發送的
這裏是我的代碼
try {
SmsManager sms = SmsManager.getDefault();
Toast.makeText(context, "" + phoneNumber + ": " + messageText, Toast.LENGTH_SHORT).show();
PendingIntent sentPI = PendingIntent.getBroadcast(getActivity(), 0, new Intent("SMS_SENT"), 0);
PendingIntent deliveredPI = PendingIntent.getBroadcast(getActivity(), 0, new Intent("SMS_DELIVERED"), 0);
sms.sendTextMessage(phoneNumbers, null, messageText, sentPI, deliveredPI);
} catch (Exception e) {
Toast.makeText(context, "Sms not Send " + e, Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
即使我用com.klinker.android.send_message
但不執行甚至
[2013-10-29 13:57:50 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/gson/JsonSerializer;
[2013-10-29 13:57:50 - kluebook] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/gson/JsonSerializer;
`
嘗試更新您的ADT插件。或創建一個新的工作區,並嘗試 –
未解決我的問題 –