Skip to content

PrinterSearcher

A Brother Label & Mobile printer searcher.

Overview

You use this object to search for printers. Available printers are returned as an array of Channel objects.

Class methods

startNetworkSearch

Begins searching for compatible printers that exist on the network.

Declaration

public static PrinterSearchResult startNetworkSearch(Context context, NetworkSearchOption option, Consumer<Channel> callback);

Parameters

Name Type Description
context Context Android context
searchOption NetworkSearchOption Option to control this function
callback Consumer<Channel> A function called whenever a printer is found

Return Value

See PrinterSearchResult.

cancelNetworkSearch

Cancel searching for compatible printers that exist on the network.

Declaration

public static void cancelNetworkSearch();

startBluetoothSearch

Get the list of compatible printers paired to the mobile device.

Declaration

public static PrinterSearchResult startBluetoothSearch(Context context);

Parameters

Name Type Description
context Context Android context

Return Value

See PrinterSearchResult.

startBLESearch

Begins searching printers which support Bluetooth Low Energy.

Declaration

public static PrinterSearchResult startBLESearch(Context context, BLESearchOption option, Consumer<Channel> callback);

Parameters

Name Type Description
context Context Android context
searchOption BLESearchOption Option to control this function
callback Consumer<Channel> A function called whenever a printer is found

Return Value See PrinterSearchResult.

cancelBLESearch

Cancel searching for compatible printers which support Bluetooth Low Energy.

Declaration

public static void cancelBLESearch();

startUSBSearch

Get the printer connected to the mobile device via USB.

Declaration

public static PrinterSearchResult startUSBSearch(Context context);

Parameters

Name Type Description
context Context Android context

Return Value

See PrinterSearchResult.