java.lang.Object | |
↳ | android.net.NetworkRequest.Builder |
Builder used to create NetworkRequest
objects. Specify the Network features
needed in terms of NetworkCapabilities
features
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor for Builder.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add the given capability requirement to this builder.
| |||||||||||
Adds the given transport requirement to this builder.
| |||||||||||
Build
NetworkRequest give the current set of capabilities. | |||||||||||
Removes (if found) the given capability from this builder instance.
| |||||||||||
Removes (if found) the given transport from this builder instance.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Default constructor for Builder.
Add the given capability requirement to this builder. These represent
the requested network's required capabilities. Note that when searching
for a network to satisfy a request, all capabilities requested must be
satisfied. See NetworkCapabilities
for NET_CAPABILITIY_*
definitions.
capability | The NetworkCapabilities.NET_CAPABILITY_* to add. |
---|
builder.addCapability(...).addCapability();
.
Adds the given transport requirement to this builder. These represent
the set of allowed transports for the request. Only networks using one
of these transports will satisfy the request. If no particular transports
are required, none should be specified here. See NetworkCapabilities
for TRANSPORT_*
definitions.
transportType | The NetworkCapabilities.TRANSPORT_* to add. |
---|
Removes (if found) the given capability from this builder instance.
capability | The NetworkCapabilities.NET_CAPABILITY_* to remove. |
---|
Removes (if found) the given transport from this builder instance.
transportType | The NetworkCapabilities.TRANSPORT_* to remove. |
---|