Language

CarrierConfigManager.GetConfig(String[]) Method

Definition

Gets the configuration values of the specified config keys applied for the default subscription.

[Android.Runtime.Register("getConfig", "([Ljava/lang/String;)Landroid/os/PersistableBundle;", "GetGetConfig_arrayLjava_lang_String_Handler", ApiSince=34)]
public virtual Android.OS.PersistableBundle GetConfig(params string[] keys);
[<Android.Runtime.Register("getConfig", "([Ljava/lang/String;)Landroid/os/PersistableBundle;", "GetGetConfig_arrayLjava_lang_String_Handler", ApiSince=34)>]
abstract member GetConfig : string[] -> Android.OS.PersistableBundle
override this.GetConfig : string[] -> Android.OS.PersistableBundle

Parameters

keys
String[]

The config keys to retrieve values. This value cannot be null.

Returns

A PersistableBundle with key/value mapping for the specified carrier configs on success, or an empty (but never null) bundle on failure.

Attributes

Remarks

Gets the configuration values of the specified config keys applied for the default subscription. If the value for the key can't be found, the returned bundle will filter the key out. After using this method to get the configuration bundle, isConfigForIdentifiedCarrier(PersistableBundle) should be called to confirm whether any carrier specific configuration has been applied. Note that on success, the key/value for KEY_CARRIER_CONFIG_VERSION_STRING and KEY_CARRIER_CONFIG_APPLIED_BOOL are always in the returned bundle, no matter if they were explicitly requested. Requires Permission: READ_PHONE_STATE, or the calling app has carrier privileges for the default subscription (see TelephonyManager.hasCarrierPrivileges() ). Requires Manifest.permission.READ_PHONE_STATE or carrier privileges

Android reference for android.telephony.CarrierConfigManager.getConfig.

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