Share via


SmsManager.SmscAddress Property

Definition

Gets the SMSC address from (U)SIM.

public string? SmscAddress { [Android.Runtime.Register("getSmscAddress", "()Ljava/lang/String;", "", ApiSince=30)] [Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")] get; }
[<get: Android.Runtime.Register("getSmscAddress", "()Ljava/lang/String;", "", ApiSince=30)>]
[<get: Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")>]
member this.SmscAddress : string

Property Value

the SMSC address string, null if failed.

Attributes

Remarks

Gets the SMSC address from (U)SIM.

<p class="note"><strong>Note:</strong> Using this method requires that your app is the default SMS application, or READ_PRIVILEGED_PHONE_STATE permission, or has the carrier privileges.</p>

<p class="note"><strong>Note:</strong> This method 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 method will be INVALID, which will result in the operation being completed on the subscription associated with logical slot 0. Use #getSmsManagerForSubscriptionId(int) to ensure the operation is performed on the correct subscription. </p>

Java documentation for android.telephony.SmsManager.getSmscAddress().

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