-
Notifications
You must be signed in to change notification settings - Fork 28
Enabling the SDK
By default, the SDK is disabled and will not scan for nearby Jots. You can check to see if the SDK is enabled or disabled at any time by using the enabled property on the JotStylusManager.
BOOL enabled = [[JotStylusManager sharedInstance] enabled];
Enabling the SDK is the first step to getting connected to Jots. To enable the SDK, simply add the following line.
[[JotStylusManager sharedInstance] enable];
To disable the SDK simply call
[[JotStylusManager sharedInstance] disable];
By default, the SDK will display a UIAlertView if the user tries to connect to a Jot, but Bluetooth is turned off on their device.
If you wish to present your own UI in this situation, you need to tell the SDK about this when you enable it. Simply use this alternative enable method.
[[JotStylusManager sharedInstance] enableWithBluetoothPowerOnAlert:NO];
Then register an observer with the default NSNotificationCenter for the JotStylusManagerDiscoveryAttemptedButBluetoothOffNotification and present your custom UI at that time.
Copyright (c) 2021 Adonit. All rights reserved.