BRPtouchBluetoothManager
BRPtouchBluetoothManager
lists printers connected via Bluetooth. The printers need to be paired on the OS setting beforehand.
Class Methods
sharedManager
Get the instance of BRPtouchBluetoothManager
.
Declaration
+ (BRPtouchBluetoothManager *)sharedManager;
Return Value
The shared instance of BRPtouchBluetoothManager
.
Instance Methods
pairedDevices
Get the list of printers paired to the mobile device.
Declaration
- (NSArray *)pairedDevices
Return Value
Array of BRPtouchDeviceInfo
which are Bluetooth printers connected to the mobile device.
registerForBRDeviceNotification
Registers notifications for of the printer connection status. You can receive them from NSNotificationCenter
using the following keys.
BRDeviceDidConnectNotification
is notified when the printer is connected to the mobile deviceBRDeviceDidDisconnectNotification
is notified when the printer is disconnected from the mobile device
The notification includes the printer information as BRPtouchDeviceInfo
object. You can retrieve it from userInfo
with BRDeviceKey
.
Declaration
- (void)registerForBRDeviceNotification;
unregisterForBRDeviceNotification
Unregisters notifications registered with registerForBRDeviceNotification
.
Declaration
- (void)unregisterForBRDeviceNotification;
brShowBluetoothAccessoryPickerWithNameFilter
Displays an alert view that allows user to pair the discovered Bluetooth accessory. Since the view is OS standard one, the behavior may depends on the version of OS.
Declaration
- (void)brShowBluetoothAccessoryPickerWithNameFilter:(NSPredicate *)predicate;
Parameters
Parameter | Description |
---|---|
predicate | The predicate is evaluated using the name of the Bluetooth accessory to filter the discovered accessories. If you want to display all discovered accessories, specify nil. |