Share via


LinkProperties.AddRoute(RouteInfo) Method

Definition

Adds a RouteInfo to this LinkProperties.

[Android.Runtime.Register("addRoute", "(Landroid/net/RouteInfo;)Z", "", ApiSince=29)]
public bool AddRoute (Android.Net.RouteInfo route);
[<Android.Runtime.Register("addRoute", "(Landroid/net/RouteInfo;)Z", "", ApiSince=29)>]
member this.AddRoute : Android.Net.RouteInfo -> bool

Parameters

route
RouteInfo

A RouteInfo to add to this object.

Returns

true was added or updated, false otherwise.

Attributes

Remarks

Adds a RouteInfo to this LinkProperties. If there is a RouteInfo with the same destination, gateway and interface with different properties (e.g., different MTU), it will be updated. If the RouteInfo had an interface name set and that differs from the interface set for this LinkProperties an IllegalArgumentException will be thrown. The proper course is to add either un-named or properly named RouteInfo.

Java documentation for android.net.LinkProperties.addRoute(android.net.RouteInfo).

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