Język

BluetoothLeDeviceFilter.Builder.SetRenameFromName Method

Definition

Renames the devices shown in the list with characters from the device's display name and a custom prefix and suffix.

[Android.Runtime.Register("setRenameFromName", "(Ljava/lang/String;Ljava/lang/String;II)Landroid/companion/BluetoothLeDeviceFilter$Builder;", "", ApiSince=26)]
public Android.Companion.BluetoothLeDeviceFilter.Builder SetRenameFromName(string prefix, string suffix, int nameFrom, int nameLength);
[<Android.Runtime.Register("setRenameFromName", "(Ljava/lang/String;Ljava/lang/String;II)Landroid/companion/BluetoothLeDeviceFilter$Builder;", "", ApiSince=26)>]
member this.SetRenameFromName : string * string * int * int -> Android.Companion.BluetoothLeDeviceFilter.Builder

Parameters

prefix
String

The text to show before the selected name characters. This value cannot be null.

suffix
String

The text to show after the selected name characters. This value cannot be null.

nameFrom
Int32

the start name character index to be displayed (inclusive)

nameLength
Int32

the number of characters to be displayed from the given index

Returns

self for chaining. This value cannot be null.

Attributes

Remarks

The prefix cannot be longer than RenamePrefixLengthLimit characters. The range of name characters cannot be empty. You can set a rename rule only one time for each builder. The device's display name is its alias, or its address if the alias is empty.

Android reference for android.companion.BluetoothLeDeviceFilter.Builder.setRenameFromName.

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