TelephonyManager.GetDeviceId(Int32) Method

Definition

Caution

deprecated

Returns the unique device ID of a subscription, for example, the IMEI for GSM and the MEID for CDMA phones.

[Android.Runtime.Register("getDeviceId", "(I)Ljava/lang/String;", "GetGetDeviceId_IHandler", ApiSince=23)]
[Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")]
[System.Obsolete("deprecated")]
public virtual string? GetDeviceId (int slotIndex);
[<Android.Runtime.Register("getDeviceId", "(I)Ljava/lang/String;", "GetGetDeviceId_IHandler", ApiSince=23)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")>]
[<System.Obsolete("deprecated")>]
abstract member GetDeviceId : int -> string
override this.GetDeviceId : int -> string

Parameters

slotIndex
Int32

of which deviceID is returned

Returns

String
Attributes

Remarks

Java documentation for android.telephony.TelephonyManager.getDeviceId(int).

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