我最新的问题是,当我尝试从我的应用程序发送一次性短信时,它不会发送......而最奇怪的是,实际上出现零错误???
我的代码:
try {
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phonenum , null , String.valueOf(num), null, null);
Toast.makeText(getApplicationContext(), "Message sent.", Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),"Message failed, please try again.",
Toast.LENGTH_LONG).show(); e.printStackTrace();
}