Setting up your Notches
In order to use your notches, you must follow these steps.
First set up your notches for use & make sure they will have a valid measurement:
- Paring
- Calibration
Once you have the pre requisites you can start the capture flow
- Create a workout
- Setup the Notch network
- Wear the devices
- Steady
- Do the capture
- Download
This is described in an other document.
Pairing
A user needs to pair their notches to the license code they got.
For iOS users this must be done every time after a user logged out or switched to a new device. This is a necessary operation due to OS limitations.
For Android users, there is no need to re-pair the devices to the same phone.
NOTE If the other application paired the same Notches after being paired with your application you will need to pair them. (Otherwise, you will get a notch ID has been changed error
during any communication.
- The user turns on one Notch at a time
- Call the
NotchService.pair(...)
function of the notch service. - The success callback receives a
NotchDevice
object, which is the database representation of the paired device.
-
mNotchService.pair(new EmptyCallback<Device>() { @Override public void onSuccess(Device device) { updateUser(mNotchService.getLicense()); shutdown(); } });
-
service.pair( success: { device in // Do anything with the device you would like to }, failure: { error in // Do something in case of error }, progress: { _ in }, cancelled: { } )
Network initialization
Before each service call that requires interaction with notches, you need to have a NotchNetwork
.
For obtaining one you need to search via Bluetooth to map the turned on and paired notches.
- You want to search for all turned on notches (eg. for calibration)
- Use:
NotchService.uncheckedInit(...)
- Use:
- You have a
NotchWorkout
that requires several notches to be in the network.- For simple usage:
NotchService.initWithWorkout(...)
- With fixed channel:
NotchService.initWithChannelAndWorkout(...)
- For simple usage:
IMPORTANT: A network only contains notches set to the same channel. See more @ channels
Calibration
We highly suggest you calibrating the notch sensors within 8 hours of the latest calibration to map the magnetic properties of the current place.
If a Notch sensor is close to a metal object (a watch, table with metal structure etc.) the calibration could fail.
Steps
- Make sure the service has a valid network.
- Call
NotchService.configureCalibration(...)
and wait for it to succeed - Call
NotchService.calibration(...)
and wait for the calibration process. During the process, the user must follow the predefined calibration movements. - When the calibration succeeded, call
NotchService.getCalibrationData(...)
. The parameter of success is a bool value.- If it is true, the calibration finished with a warning. The calibration data is valid in this case you may be magnetic objects.
- In case of false everything is good.