Partager via


CarrierConfigManager.GetConfigByComponentForSubId(String, Int32) Method

Definition

Gets the configuration values for a component using its prefix.

[Android.Runtime.Register("getConfigByComponentForSubId", "(Ljava/lang/String;I)Landroid/os/PersistableBundle;", "GetGetConfigByComponentForSubId_Ljava_lang_String_IHandler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")]
public virtual Android.OS.PersistableBundle? GetConfigByComponentForSubId (string prefix, int subId);
[<Android.Runtime.Register("getConfigByComponentForSubId", "(Ljava/lang/String;I)Landroid/os/PersistableBundle;", "GetGetConfigByComponentForSubId_Ljava_lang_String_IHandler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
abstract member GetConfigByComponentForSubId : string * int -> Android.OS.PersistableBundle
override this.GetConfigByComponentForSubId : string * int -> Android.OS.PersistableBundle

Parameters

prefix
String

prefix of the component.

subId
Int32

the subscription ID, normally obtained from SubscriptionManager.

Returns

Attributes

Remarks

Gets the configuration values for a component using its prefix.

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

Java documentation for android.telephony.CarrierConfigManager.getConfigByComponentForSubId(java.lang.String, 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