SmsManager.SendTextMessage 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
deprecated
發送簡訊。
[Android.Runtime.Register("sendTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V", "")]
[System.Obsolete("deprecated")]
public void SendTextMessage(string? destinationAddress, string? scAddress, string? text, Android.App.PendingIntent? sentIntent, Android.App.PendingIntent? deliveryIntent);
[<Android.Runtime.Register("sendTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V", "")>]
[<System.Obsolete("deprecated")>]
member this.SendTextMessage : string * string * string * Android.App.PendingIntent * Android.App.PendingIntent -> unit
參數
- destinationAddress
- String
要傳送訊息的地址
- scAddress
- String
是服務中心地址或空,使用當前預設的 SMSC
- text
- String
要發送的訊息內容
- sentIntent
- PendingIntent
若非 NULL PendingIntent ,則在訊息成功傳送或失敗時廣播。
結果碼會顯示Activity.RESULT_OK成功,或以下其中一種錯誤:RESULT_ERROR_GENERIC_FAILURERESULT_ERROR_RADIO_OFFRESULT_ERROR_NULL_PDU 。
基於每個應用程式的簡訊控制檢查是發送意圖。 若 sentIntent 為 NULL,呼叫者將被檢查所有未知應用程式,導致檢查期間發送的簡訊數量減少。
- deliveryIntent
- PendingIntent
若非 NULL PendingIntent ,則在訊息送達接收端時即廣播此訊息。 狀態報告的原始 PDU 則在擴展資料(「pdu」)中。
- 屬性
例外狀況
若 destinationAddress 或文字為空
備註
發送簡訊。
此會員已被棄用。 使用 android.telephony.SmsManager。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。