Chat
Chat

CoreForTech

Native ScriptTypescriptSwiftKotlin

Prevention of drowsiness while driving

Mobile app

The client

The startup Core For Tech is trying to detect the risks of falling asleep at the wheel. Nicolas Vera, engineer and founder of the startup, worked for two years with members of the CHR of Lille to develop a solution capable of detecting drowsiness "20 minutes before visible signs appear".

The project and needs

Core For Tech is a mobile application that detects the risks of falling asleep through heart rate information collected by a connected object (watch or belt).

The connected objects are either from the Garmin brand (which has a particular protocol, in addition to the BLE protocol) or from any brand that supports the standard BLE (Bluetooth Low Energy) protocol.


Originally, a first application had been developed by an agency in React Native, but it contained many bugs. Hervé Blanc, CTO of Core For Tech, decided to launch a rewrite in NativeScript, in partnership with Kanso.


Kanso's prerogatives for this project are:

  • Resolve various urgent bugs making the React Native application "unusable". In particular, bugs in data collection and Garmin SDK integration
  • Port the Garmin SDK integration to the NativeScript environment, and manage updates
  • Develop and maintain the evolutions of the NativeScript application (UI/UX novelties)
  • Integrate various native SDKs (Can Controls, DriveQuant) into the NativeScript application to enhance its operation and improve the user experience

The proposed solution

To solve the (many) problems associated with the React Native application, Kanso carried out:

  • Several automatic tests and many manual end-to-end tests. A particularly complex bug was the identification of untimely interruptions in the collection of heart rate data. Kanso managed to provide a reproducible example to the Garmin teams, who corrected the problem in an update of their SDK
  • An audit of the code and many refactorings. A frequent defect was the improper use of promises (asynchronous calls when the rest of the function depends on the result) in the codebase
  • An upgrade of certain libraries (notably for the BLE protocol)
  • The removal of certain libraries that were little or not maintained, for which a simple equivalent could be coded by hand

For the rewrite, Kanso played a support role with a NativeScript expert present within the Core For Tech team. He created a substantial skeleton, which Kanso completed with:

  • The integration of the Garmin SDK for android and iOS. For android, the NS platform allows you to write the SDK calls directly in javascript/typescript, but for the iOS part you have to write the calls via interfaces in Swift following certain naming conventions
  • The creation of a new registration and login process, since the UX of the React Native application was not satisfactory for Core For Tech's customers. This process integrated all the issues of rights requests (especially for bluetooth)
  • The integration of the Can Control SDK to add a visual component to the heart signals in drowsiness detection
  • The integration of the DriveQuant SDK for the automatic detection of the start of a journey. This integration required specific developments within NativeScript to launch the app from a service (even when the app is closed, not just in the background). This functionality also required many tests in real conditions as well as exchanges with the DriveQuant teams
image1

The technical stack and infrastructure

  • Typescript, Java, Kotlin, Swift
  • React Native
  • Bluetooth Low Energy
  • Garmin
  • NativeScript
  • Gitlab CI

Native ScriptTypescriptSwiftKotlin

The scope of action/The means deployed (duration and team)

The collaboration with Core For Tech lasted 1 year and a half, with about 1 FTE over a year and then about 2 FTE over 6 months.

The impact

3.5+ million euros raised
gold medalGold medal Carcept prev
20 years of research on heart rate variability and its applications

Any ideas ? any project ?

Don't hesitate to let us know

We will reply in the hour