28
Printer search
Starting the printer search
Use the Finder class's start (p.96) to start searching for printers. Please refer to the following code.
Getting the printer search result.
Use the Finder class's getResult (p.98) to get the result of the printer search.
Please refer to the following code.
Stopping the printer search
Use the Finder class's stop (p.97) to stop searching for printers. Please refer to the following code.
Since the printer search takes time to complete, you might not receive any search results
if you call the Finder class's getResult immediately after you call start.
int errStatus = IoStatus.SUCCESS;
//Start search
try {
Finder.start(getBaseContext(), DevType.TCP, "192.168.192.168");
//Exception handling
} catch ( EpsonIoException e ) {
errStatus = e.getStatus();
}
int errStatus = IoStatus.SUCCESS;
String[] mList = null;
//Get device list
try {
mList = Finder.getResult();
//Exception handling
} catch ( EpsonIoException e ) {
errStatus = e.getStatus();
}
int errStatus = IoStatus.SUCCESS;
//Stop search
try {
Finder.stop();
//Exception handling
} catch ( EpsonIoException e ) {
errStatus = e.getStatus();
}