Share via


TelephonyManager.PreferredOpportunisticDataSubscription Property

Definition

Get preferred opportunistic data subscription Id

public virtual int PreferredOpportunisticDataSubscription { [Android.Runtime.Register("getPreferredOpportunisticDataSubscription", "()I", "GetGetPreferredOpportunisticDataSubscriptionHandler", ApiSince=29)] get; }
[<get: Android.Runtime.Register("getPreferredOpportunisticDataSubscription", "()I", "GetGetPreferredOpportunisticDataSubscriptionHandler", ApiSince=29)>]
member this.PreferredOpportunisticDataSubscription : int

Property Value

subId preferred opportunistic subscription id or SubscriptionManager#DEFAULT_SUBSCRIPTION_ID if there are no preferred subscription id

Attributes

Remarks

Get preferred opportunistic data subscription Id

Requires that the calling app has carrier privileges (see #hasCarrierPrivileges), or has either READ_PRIVILEGED_PHONE_STATE or android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE permission.

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

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