<<android瘋狂講義2>> 10.4 sendsms代碼,實驗證明有效.但這裡有一點需要說明:android.telephony.SmsManager。.sendTextMessage(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)中參數解釋:1)PendingIntent sentIntent:當短信發出時,成功的話sendIntent會把其内部的描述的intent廣播出去,否則産生錯誤代碼并通過android.app.PendingIntent.OnFinished進行回調,這個參數最好不為空,否則會存在資源浪費的潛在問題;2)PendingIntent deliveryIntent:是當消息已經傳遞給收信人後所進行的PendingIntent廣播。我在這段代碼中将sManager.sendTextMessage(number.getText().toString(),null, content.getText().toString(), pi, null);改為sManager.sendTextMessage(number.getText().toString(),null,content.getText().toString(), null, null);程式在功能上仍然正常執行。