次の方法で共有


TelephonyManager.SetLine1NumberForDisplay(String, String) Method

Definition

Set the line 1 phone number string and its alphatag for the current ICCID for display purpose only, for example, displayed in Phone Status.

[Android.Runtime.Register("setLine1NumberForDisplay", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetSetLine1NumberForDisplay_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=22)]
public virtual bool SetLine1NumberForDisplay (string? alphaTag, string? number);
[<Android.Runtime.Register("setLine1NumberForDisplay", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetSetLine1NumberForDisplay_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=22)>]
abstract member SetLine1NumberForDisplay : string * string -> bool
override this.SetLine1NumberForDisplay : string * string -> bool

Parameters

alphaTag
String

alpha-tagging of the dailing nubmer

number
String

The dialing number

Returns

true if the operation was executed correctly.

Attributes

Remarks

Set the line 1 phone number string and its alphatag for the current ICCID for display purpose only, for example, displayed in Phone Status. It won't change the actual MSISDN/MDN. To unset alphatag or number, pass in a null value.

Requires that the calling app has carrier privileges (see #hasCarrierPrivileges).

This member is deprecated. use SubscriptionManager#setCarrierPhoneNumber(int, String) instead.

Java documentation for android.telephony.TelephonyManager.setLine1NumberForDisplay(java.lang.String, java.lang.String).

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