CarrierConfigManager.GetConfigForSubId Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetConfigForSubId(Int32) |
Gets the configuration values for a particular subscription, which is associated with a specific SIM card. |
GetConfigForSubId(Int32, String[]) |
GetConfigForSubId(Int32)
Gets the configuration values for a particular subscription, which is associated with a specific SIM card.
[Android.Runtime.Register("getConfigForSubId", "(I)Landroid/os/PersistableBundle;", "GetGetConfigForSubId_IHandler", ApiSince=23)]
[Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")]
public virtual Android.OS.PersistableBundle? GetConfigForSubId (int subId);
[<Android.Runtime.Register("getConfigForSubId", "(I)Landroid/os/PersistableBundle;", "GetGetConfigForSubId_IHandler", ApiSince=23)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
abstract member GetConfigForSubId : int -> Android.OS.PersistableBundle
override this.GetConfigForSubId : int -> Android.OS.PersistableBundle
Parameters
- subId
- Int32
the subscription ID, normally obtained from SubscriptionManager
.
Returns
A PersistableBundle
containing the config for the given subId, or default
values for an invalid subId.
- Attributes
Remarks
Gets the configuration values for a particular subscription, which is associated with a specific SIM card. If an invalid subId is used, the returned config will contain default values. After using this method to get the configuration bundle, #isConfigForIdentifiedCarrier(PersistableBundle)
should be called to confirm whether any carrier specific configuration has been applied.
Requires Permission: android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE
, or the calling app has carrier privileges (see TelephonyManager#hasCarrierPrivileges()
).
This member is deprecated. Use #getConfigForSubId(int, String...)
instead.
Java documentation for android.telephony.CarrierConfigManager.getConfigForSubId(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
GetConfigForSubId(Int32, String[])
[Android.Runtime.Register("getConfigForSubId", "(I[Ljava/lang/String;)Landroid/os/PersistableBundle;", "GetGetConfigForSubId_IarrayLjava_lang_String_Handler", ApiSince=34)]
public virtual Android.OS.PersistableBundle GetConfigForSubId (int subId, params string[] keys);
[<Android.Runtime.Register("getConfigForSubId", "(I[Ljava/lang/String;)Landroid/os/PersistableBundle;", "GetGetConfigForSubId_IarrayLjava_lang_String_Handler", ApiSince=34)>]
abstract member GetConfigForSubId : int * string[] -> Android.OS.PersistableBundle
override this.GetConfigForSubId : int * string[] -> Android.OS.PersistableBundle
Parameters
- subId
- Int32
- keys
- String[]
Returns
- Attributes