111
Chapter 5 Command Transmission/Reception
5
start
Starts a search for printers of the specified device type.
Syntax
public static synchronized void start
(Context context, int deviceType,
String findOption)
throws EpsonIoException
Parameter
context : Set a Context class instance of caller.
(Example: Set the Context acquired by getBaseContext() in Activity.)
deviceType : Specifies the device type to search for. The following values can be specified.
findOption : Specifies the setting value when searching for a specific target device.
Exceptions
When processing fails, EpsonIoException is thrown with one of the following error values.
• If you use this API, be sure to use stop (p.112) to stop the search.
• You cannot call this API when a printer search is already in progress.
deviceType Description
DevType.TCP Searches for TM devices connected to the network
DevType.BLUETOOTH
Searches for Bluetooth devices that have a device class
of Printer or Uncategorized.
deviceType Setting Value
DevType.TCP The broadcast address to search for
DevType.BLUETOOTH "null"
Error Value Description
IoStatus.ERR_ILLEGAL This API was called when a search was already in progress
IoStatus.ERR_PROCESSING Could not execute process.
IoStatus.ERR_PARAM Invalid parameter was passed.
IoStatus.ERR_MEMORY Could not allocate memory.
IoStatus.ERR_FAILURE An unspecified error occurred.