TelephonyManager.SetNetworkSelectionModeManual 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
SetNetworkSelectionModeManual(String, Boolean) |
Ask the radio to connect to the input network and change selection mode to manual. |
SetNetworkSelectionModeManual(String, Boolean, Int32) |
Ask the radio to connect to the input network and change selection mode to manual. |
SetNetworkSelectionModeManual(String, Boolean)
Ask the radio to connect to the input network and change selection mode to manual.
[Android.Runtime.Register("setNetworkSelectionModeManual", "(Ljava/lang/String;Z)Z", "GetSetNetworkSelectionModeManual_Ljava_lang_String_ZHandler", ApiSince=28)]
[Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")]
public virtual bool SetNetworkSelectionModeManual (string? operatorNumeric, bool persistSelection);
[<Android.Runtime.Register("setNetworkSelectionModeManual", "(Ljava/lang/String;Z)Z", "GetSetNetworkSelectionModeManual_Ljava_lang_String_ZHandler", ApiSince=28)>]
[<Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")>]
abstract member SetNetworkSelectionModeManual : string * bool -> bool
override this.SetNetworkSelectionModeManual : string * bool -> bool
Parameters
- operatorNumeric
- String
the PLMN ID of the network to select.
- persistSelection
- Boolean
whether the selection will persist until reboot. If true, only allows attaching to the selected PLMN until reboot; otherwise, attach to the chosen PLMN and resume normal network selection next time.
Returns
true
on success; false
on any failure.
- Attributes
Remarks
Ask the radio to connect to the input network and change selection mode to manual.
If this object has been created with #createForSubscriptionId
, applies to the given subId. Otherwise, applies to SubscriptionManager#getDefaultSubscriptionId()
Requires Permission: android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE
or that the calling app has carrier privileges (see #hasCarrierPrivileges
).
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
SetNetworkSelectionModeManual(String, Boolean, Int32)
Ask the radio to connect to the input network and change selection mode to manual.
[Android.Runtime.Register("setNetworkSelectionModeManual", "(Ljava/lang/String;ZI)Z", "GetSetNetworkSelectionModeManual_Ljava_lang_String_ZIHandler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")]
public virtual bool SetNetworkSelectionModeManual (string operatorNumeric, bool persistSelection, int ran);
[<Android.Runtime.Register("setNetworkSelectionModeManual", "(Ljava/lang/String;ZI)Z", "GetSetNetworkSelectionModeManual_Ljava_lang_String_ZIHandler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")>]
abstract member SetNetworkSelectionModeManual : string * bool * int -> bool
override this.SetNetworkSelectionModeManual : string * bool * int -> bool
Parameters
- operatorNumeric
- String
the PLMN ID of the network to select.
- persistSelection
- Boolean
whether the selection will persist until reboot. If true, only allows attaching to the selected PLMN until reboot; otherwise, attach to the chosen PLMN and resume normal network selection next time.
- ran
- Int32
the initial suggested radio access network type.
If registration fails, the RAN is not available after, the RAN is not within the
network types specified by the preferred network types, or the value is
AccessNetworkConstants.AccessNetworkType#UNKNOWN
, modem will select
the next best RAN for network registration.
Returns
true
on success; false
on any failure.
- Attributes
Remarks
Ask the radio to connect to the input network and change selection mode to manual.
If this object has been created with #createForSubscriptionId
, applies to the given subId. Otherwise, applies to SubscriptionManager#getDefaultSubscriptionId()
Requires Permission: android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE
or that the calling app has carrier privileges (see #hasCarrierPrivileges
).
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.