Added in API level 33

Builder

class Builder
kotlin.Any
   ↳ android.telephony.AvailableNetworkInfo.Builder

Provides a convenient way to set the fields of a AvailableNetworkInfo when creating a new instance.

The example below shows how you might create a new AvailableNetworkInfo:

<code>
 
  AvailableNetworkInfo aNI = new AvailableNetworkInfo.Builder(subId)
      .setPriority(AvailableNetworkInfo.PRIORITY_MED)
      .setRadioAccessSpecifiers(radioAccessSpecifiers)
      .setMccMncs(mccMncs)
      .build();
  </code>

Summary

Public constructors
Builder(subId: Int)

Creates an AvailableNetworkInfo Builder with specified subscription id.

Public methods
AvailableNetworkInfo

AvailableNetworkInfo.Builder

Sets the list of mccmncs associated with the subscription id.

AvailableNetworkInfo.Builder
setPriority(priority: Int)

Sets the priority for the subscription id.

AvailableNetworkInfo.Builder

Sets the list of mccmncs associated with the subscription id.

Public constructors

Builder

Added in API level 33
Builder(subId: Int)

Creates an AvailableNetworkInfo Builder with specified subscription id.

Parameters
subId Int: of the availableNetwork.

Public methods

build

Added in API level 33
fun build(): AvailableNetworkInfo
Return
AvailableNetworkInfo an AvailableNetworkInfo object with all the fields previously set by the Builder. This value cannot be null.

setMccMncs

Added in API level 33
fun setMccMncs(mccMncs: MutableList<String!>): AvailableNetworkInfo.Builder

Sets the list of mccmncs associated with the subscription id.

Parameters
mccMncs MutableList<String!>: nonull list of mccmncs. An empty List is still accepted. Please read documentation in AvailableNetworkInfo to see consequences of an empty List. This value cannot be null.
Return
AvailableNetworkInfo.Builder the original Builder object. This value cannot be null.

setPriority

Added in API level 33
fun setPriority(priority: Int): AvailableNetworkInfo.Builder

Sets the priority for the subscription id.

Parameters
priority Int: of the subscription id. See AvailableNetworkInfo#getPriority for more details Value is android.telephony.AvailableNetworkInfo#PRIORITY_HIGH, android.telephony.AvailableNetworkInfo#PRIORITY_MED, or android.telephony.AvailableNetworkInfo#PRIORITY_LOW
Return
AvailableNetworkInfo.Builder the original Builder object. This value cannot be null.

setRadioAccessSpecifiers

Added in API level 33
fun setRadioAccessSpecifiers(radioAccessSpecifiers: MutableList<RadioAccessSpecifier!>): AvailableNetworkInfo.Builder

Sets the list of mccmncs associated with the subscription id.

Parameters
radioAccessSpecifiers MutableList<RadioAccessSpecifier!>: nonull list of radioAccessSpecifiers. An empty List is still accepted. Please read documentation in AvailableNetworkInfo to see consequences of an empty List. This value cannot be null.
Return
AvailableNetworkInfo.Builder the original Builder object. This value cannot be null.