Udostępnij za pośrednictwem


SmsManager.SendTextMessageWithoutPersisting Method

Definition

Send a text based SMS without writing it into the SMS Provider.

[Android.Runtime.Register("sendTextMessageWithoutPersisting", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V", "", ApiSince=28)]
public void SendTextMessageWithoutPersisting (string? destinationAddress, string? scAddress, string? text, Android.App.PendingIntent? sentIntent, Android.App.PendingIntent? deliveryIntent);
[<Android.Runtime.Register("sendTextMessageWithoutPersisting", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V", "", ApiSince=28)>]
member this.SendTextMessageWithoutPersisting : string * string * string * Android.App.PendingIntent * Android.App.PendingIntent -> unit

Parameters

destinationAddress
String
scAddress
String
text
String
sentIntent
PendingIntent
deliveryIntent
PendingIntent
Attributes

Remarks

Send a text based SMS without writing it into the SMS Provider.

The message will be sent directly over the network and will not be visible in SMS applications. Intended for internal carrier use only.

Requires Permission: Both android.Manifest.permission#SEND_SMS and android.Manifest.permission#MODIFY_PHONE_STATE, or that the calling app has carrier privileges (see TelephonyManager#hasCarrierPrivileges), or that the calling app is the default IMS app (see CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING).

<p class="note"><strong>Note:</strong> This method is intended for internal use by carrier applications or the Telephony framework and will never trigger an SMS disambiguation dialog. If this method is called on a device that has multiple active subscriptions, this SmsManager instance has been created with #getDefault(), and no user-defined default subscription is defined, the subscription ID associated with this message will be INVALID, which will result in the SMS being sent on the subscription associated with logical slot 0. Use #getSmsManagerForSubscriptionId(int) to ensure the SMS is sent on the correct subscription. </p>

Java documentation for android.telephony.SmsManager.sendTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to