A basic mobile app for your SCiO Sensor will have the following workflow:

 

Register your app:
Register your app on the SCiO Cloud and receive an Application ID and Application secret.

Implement Login functionality, get access token:
Build the first login for the user. Retrieve the access token to prevent the user from entering login details each time they open the document.

Connect to the SCiO Sensor:
Use the Bluetooth Low Energy API to ensure that your Bluetooth settings are enabled in your iOS device. Search and connect to the SCiO Sensor.

Note:

  • A SCiO Sensor can only connect to one mobile device at a time.
  • Code examples are based on the latest version of iOS SDK (1.97), available here.

Make sure the SCiO Sensor is calibrated:
Call the isCalibrationValid method to make sure the sensor is properly calibrated. Call the calibrateWithCompletion method if the SCiO Sensor is not properly calibrated.

Initiate a SCiO scan:
Once the sensor is calibrated, call the CPScioDevice.scanWithCompletion method to scan a sample. A scan returns one of the following results:

  • success: When the scan is successful, the scan returns a CPScioReading object with the sample details.
  • error: Indicates that the scan failed.

Send the SCiO reading to the Cloud for analysis:

Send the sample reading to the cloud together with a Model ID. The sample is  compared to the model and the results returned to the mobile device. The model is defined in the Scio Lab app and holds definitions for attributes and data for the sample material (such as cheese or medications).