public class BluetoothDiscoverer
extends Object
Modifier and Type | Method and Description |
---|---|
static void |
findPrinters(android.content.Context context,
DiscoveryHandler discoveryHandler)
Find Bluetooth® devices that are discoverable.
Note: This method will return all devices found, not just Zebra printers Note: This method should not be called from the application main thread. |
static void |
findPrinters(android.content.Context context,
DiscoveryHandler discoveryHandler,
DeviceFilter deviceFilter)
Find Bluetooth® devices that are discoverable.
Note: This method will return all devices found, not just Zebra printers Note: This method should not be called from the application main thread. Note: Android 6 and higher (API 23+) requires user permission ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION in your application manifest. |
static void |
findServices(android.content.Context context,
String macAddress,
ServiceDiscoveryHandler serviceDiscoveryHandler)
Find services(ConnectionChannels) that are supported by the device at
macAddress . |
public static void findPrinters(android.content.Context context, DiscoveryHandler discoveryHandler, DeviceFilter deviceFilter) throws ConnectionException
context
- Android application context.discoveryHandler
- a DiscoveryHandler
instance that is used to handle discovery events (e.g. found a
printer, errors, discovery finished).deviceFilter
- ConnectionException
- for communication or discovery errors.public static void findPrinters(android.content.Context context, DiscoveryHandler discoveryHandler) throws ConnectionException
context
- Android application context.discoveryHandler
- a DiscoveryHandler
instance that is used to handle discovery events (e.g. found a
printer, errors, discovery finished).ConnectionException
- for communication or discovery errors.public static void findServices(android.content.Context context, String macAddress, ServiceDiscoveryHandler serviceDiscoveryHandler)
macAddress
.context
- Android application context.macAddress
- MAC address of the device.serviceDiscoveryHandler
- a ServiceDiscoveryHandler
instance that is used to handle service
discovery events.IllegalArgumentException
- The Bluetooth MAC address is invalid
© 2017 ZIH Corp. All Rights Reserved.