Methods Summary |
---|
public void | deviceDiscovered(RemoteDevice device, DeviceClass type)
int major = type.getMajorDeviceClass();
try {
if (device.getFriendlyName(false).startsWith("Earthmate Blue Logger")) {
this.device = device;
// stop looking for other devices
agent.cancelInquiry(this);
// wake up the main thread
synchronized(this){
this.notify();
}
}
}
catch (IOException ex) {
// Hopefully this isn't the device we're looking for
}
|
public static RemoteDevice | find()
BlueLoggerFinder search = new BlueLoggerFinder();
search.agent = LocalDevice.getLocalDevice().getDiscoveryAgent();
search.agent.startInquiry(DiscoveryAgent.GIAC, search);
// wait for inquiry to finish
synchronized(search){
try {
search.wait();
}
catch (InterruptedException ex) {
// continue
}
}
return search.device;
|
public void | inquiryCompleted(int discoveryType)
|
public void | serviceSearchCompleted(int transactionID, int arg1)
|
public void | servicesDiscovered(int transactionID, ServiceRecord[] record)
|