Share via


TelephonyManager.CarrierConfig Property

Definition

Returns the carrier config of the subscription ID pinned to the TelephonyManager.

public virtual Android.OS.PersistableBundle? CarrierConfig { [Android.Runtime.Register("getCarrierConfig", "()Landroid/os/PersistableBundle;", "GetGetCarrierConfigHandler", ApiSince=26)] [Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")] get; }
[<get: Android.Runtime.Register("getCarrierConfig", "()Landroid/os/PersistableBundle;", "GetGetCarrierConfigHandler", ApiSince=26)>]
[<get: Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
member this.CarrierConfig : Android.OS.PersistableBundle

Property Value

Attributes

Remarks

Returns the carrier config of the subscription ID pinned to the TelephonyManager. If an invalid subscription ID is pinned to the TelephonyManager, the returned config will contain default values.

This method may take several seconds to complete, so it should only be called from a worker thread.

Requires Permission: android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE or that the calling app has carrier privileges (see #hasCarrierPrivileges).

Java documentation for android.telephony.TelephonyManager.getCarrierConfig().

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