# AvailableNetworkInfo.Builder

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#pubctors)\|[Methods](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#inhmethods)  

# AvailableNetworkInfo.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telephony/AvailableNetworkInfo.Builder "View this page in Kotlin")\|Java

`
public
static
final

class
AvailableNetworkInfo.Builder
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.AvailableNetworkInfo.Builder |

<br />

*** ** * ** ***

Provides a convenient way to set the fields of a[AvailableNetworkInfo](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo)when creating a new instance.

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



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

## Summary

|                                                                                          ### Public constructors                                                                                           ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#Builder(int))`(int subId) ` Creates an AvailableNetworkInfo Builder with specified subscription id. |

|                                                                                                                                                                                                                                                                                          ### Public methods                                                                                                                                                                                                                                                                                          ||
|---------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[AvailableNetworkInfo](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo)                 | ` `[build](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#build())`() `                                                                                                                                                                                                                                                                                                                                                           |
| ` `[AvailableNetworkInfo.Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder) | ` `[setMccMncs](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#setMccMncs(java.util.List<java.lang.String>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[String](https://developer.android.com/reference/java/lang/String)`> mccMncs) ` Sets the list of mccmncs associated with the subscription id.                                                                                                     |
| ` `[AvailableNetworkInfo.Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder) | ` `[setPriority](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#setPriority(int))`(int priority) ` Sets the priority for the subscription id.                                                                                                                                                                                                                                                                                     |
| ` `[AvailableNetworkInfo.Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder) | ` `[setRadioAccessSpecifiers](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder#setRadioAccessSpecifiers(java.util.List<android.telephony.RadioAccessSpecifier>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[RadioAccessSpecifier](https://developer.android.com/reference/android/telephony/RadioAccessSpecifier)`> radioAccessSpecifiers) ` Sets the list of mccmncs associated with the subscription id. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### Builder

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Builder (int subId)
```

Creates an AvailableNetworkInfo Builder with specified subscription id.

<br />

|                   Parameters                    ||
|---------|----------------------------------------|
| `subId` | `int`: of the availableNetwork. <br /> |

## Public methods

### build

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public AvailableNetworkInfo build ()
```

<br />

<br />

|                                                                                                           Returns                                                                                                            ||
|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
| [AvailableNetworkInfo](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo) | an AvailableNetworkInfo object with all the fields previously set by the Builder. This value cannot be`null`. <br /> |

### setMccMncs

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public AvailableNetworkInfo.Builder setMccMncs (List<String> mccMncs)
```

Sets the list of mccmncs associated with the subscription id.

<br />

|                                                                                                                                       Parameters                                                                                                                                       ||
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mccMncs` | `List`: nonull list of mccmncs. An empty List is still accepted. Please read documentation in[AvailableNetworkInfo](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo)to see consequences of an empty List. This value cannot be`null`. <br /> |

|                                                                                         Returns                                                                                         ||
|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| [AvailableNetworkInfo.Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder) | the original Builder object. This value cannot be`null`. <br /> |

### setPriority

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public AvailableNetworkInfo.Builder setPriority (int priority)
```

Sets the priority for the subscription id.

<br />

|                                                                                                                                                                                                                                                                                                      Parameters                                                                                                                                                                                                                                                                                                       ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `priority` | `int`: of the subscription id. See[AvailableNetworkInfo.getPriority](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo#getPriority())for more details Value is[AvailableNetworkInfo.PRIORITY_HIGH](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo#PRIORITY_HIGH),[AvailableNetworkInfo.PRIORITY_MED](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo#PRIORITY_MED), or[AvailableNetworkInfo.PRIORITY_LOW](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo#PRIORITY_LOW) <br /> |

|                                                                                         Returns                                                                                         ||
|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| [AvailableNetworkInfo.Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder) | the original Builder object. This value cannot be`null`. <br /> |

### setRadioAccessSpecifiers

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public AvailableNetworkInfo.Builder setRadioAccessSpecifiers (List<RadioAccessSpecifier> radioAccessSpecifiers)
```

Sets the list of mccmncs associated with the subscription id.

<br />

|                                                                                                                                                     Parameters                                                                                                                                                     ||
|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `radioAccessSpecifiers` | `List`: nonull list of radioAccessSpecifiers. An empty List is still accepted. Please read documentation in[AvailableNetworkInfo](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo)to see consequences of an empty List. This value cannot be`null`. <br /> |

|                                                                                         Returns                                                                                         ||
|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| [AvailableNetworkInfo.Builder](https://developer.android.com/reference/android/telephony/AvailableNetworkInfo.Builder) | the original Builder object. This value cannot be`null`. <br /> |