Language

WifiNetworkSuggestion.Builder.SetSubscriptionGroup(ParcelUuid) Method

Definition

Configure the suggestion to only be used with the SIMs that belong to the Subscription Group specified in this method.

[Android.Runtime.Register("setSubscriptionGroup", "(Landroid/os/ParcelUuid;)Landroid/net/wifi/WifiNetworkSuggestion$Builder;", "", ApiSince=33)]
public Android.Net.Wifi.WifiNetworkSuggestion.Builder SetSubscriptionGroup(Android.OS.ParcelUuid groupUuid);
[<Android.Runtime.Register("setSubscriptionGroup", "(Landroid/os/ParcelUuid;)Landroid/net/wifi/WifiNetworkSuggestion$Builder;", "", ApiSince=33)>]
member this.SetSubscriptionGroup : Android.OS.ParcelUuid -> Android.Net.Wifi.WifiNetworkSuggestion.Builder

Parameters

groupUuid
ParcelUuid

Subscription group UUID see SubscriptionManager.createSubscriptionGroup(List) This value cannot be null.

Returns

Instance of Builder to enable chaining of the builder method. This value cannot be null.

Attributes

Remarks

Configure the suggestion to only be used with the SIMs that belong to the Subscription Group specified in this method. The suggested network will only be used by the SIM in this Subscription Group and no other SIMs - even from the same carrier.

The caller must be a carrier provisioning app or a carrier-privileged app. A carrier-privileged app may only specify subscriptions belonging to the same carrier that signed the app; see TelephonyManager.hasCarrierPrivileges().

Specifying a subscription group that does not match these restrictions causes the suggestion to be rejected with WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED.

Only one of setSubscriptionGroup(ParcelUuid) and setSubscriptionId(int) should be called for a suggestion.

Android reference for android.net.wifi.WifiNetworkSuggestion.Builder.setSubscriptionGroup.

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