Activation and license
activate throws licenseInvalid
activate throws licenseInvalid
activate warns that the license key does not list the app id
activate warns that the license key does not list the app id
licenseInvalid. Ask NEUROFIT for a key that lists the identifier, compared exactly and case-sensitively,
before you ship (Debug builds).activate or start throws licenseInvalid: the trial key expired
activate or start throws licenseInvalid: the trial key expired
onError (licenseInvalid).Creating a session or calling start throws notActivated
Creating a session or calling start throws notActivated
activate was not called, or it threw and the error was swallowed. Activate once at launch and log the outcome.
start() rechecks activation, so it throws the same error if activation never happened.Permissions and camera
start throws cameraPermissionDenied
start throws cameraPermissionDenied
start() never prompts, so
call requestCameraPermission() first (Starting a session). After a
refusal, explain why the reading needs the camera and link to Settings (UIApplication.openSettingsURLString,
Settings.ACTION_APPLICATION_DETAILS_SETTINGS). iOS asks only once, so afterwards requestCameraPermission()
returns false at once. On Android a second refusal may be permanent, so check
shouldShowRequestPermissionRationale first. Call start() again once access is granted.Android: requestCameraPermission never calls back
Android: requestCameraPermission never calls back
hasCameraPermission in onResume
(caveat).The torch does not turn on
The torch does not turn on
hasTorch: devices without one read in room light (Device support). On a phone with a
torch, close other apps that may hold the flash, and let the phone cool down (iOS disables the torch when the
device is hot).cancelled(interrupted) after leaving the app
cancelled(interrupted) after leaving the app
cameraUnavailable
(Interruptions).Android: my own camera opens dark or colour-locked after a reading
Android: my own camera opens dark or colour-locked after a reading
stop() ran (it is idempotent, so call it from your screen’s teardown), and send NEUROFIT the device model.Positioning never starts the reading
Guidance stays on noContact
Guidance stays on noContact
Guidance alternates between weakPulseSignal and steady (iOS)
Guidance alternates between weakPulseSignal and steady (iOS)
Guidance stays on unsteady
Guidance stays on unsteady
Guidance shows lowFrameRate
Guidance shows lowFrameRate
guidanceLowFrameRate). A very old or slow device can also cause it.Guidance reaches steady but the reading never starts
Guidance reaches steady but the reading never starts
isAutoStartEnabled, setAutoStartEnabled in the wrappers). While it is false, positioning goes
on and the start progress fills, but no reading starts. Set it back to true when your screen is ready. In the
wrappers the hold goes back to true when a session ends
(Holding the start).Android: positioning takes 10 to 15 seconds even with a good signal
Android: positioning takes 10 to 15 seconds even with a good signal
steady
guidance and the start progress so the wait is visible.cancelReading does nothing
cancelReading does nothing
cancelReading() applies only while measuring. While positioning there is no attempt to cancel. Use stop() to
leave the screen.The reading keeps restarting
cancelled(contactLost)
cancelled(contactLost)
cancelled(poorSignal)
cancelled(poorSignal)
LivePreview.signalQuality drops before this cancel, so you can show it as an early cue.cancelled(interrupted) while the app stayed in front
cancelled(interrupted) while the app stayed in front
cameraUnavailable. If a device model does
this consistently, send NEUROFIT the model.Results
cancelled(qualityCheckFailed) after measurementComplete
cancelled(qualityCheckFailed) after measurementComplete
noticeQualityCheckFailed. To pause after
a few in a row, see pause after failed checks. If one device model fails it
across users, tell NEUROFIT.LivePreview.rmssdMs stays empty
LivePreview.rmssdMs stays empty
rmssdMs differs from the provisional value in LivePreview
rmssdMs differs from the provisional value in LivePreview
sd2sd1 or baevskyStressIndex is missing
sd2sd1 or baevskyStressIndex is missing
sd2sd1 is absent when its expression is undefined for the reading, and
baevskyStressIndex when it could not be computed (Metrics). rmssdMs and sdnnMs are always
present.HRV (RMSSD) reads higher than the user's wearable
HRV (RMSSD) reads higher than the user's wearable
Build and integration
SwiftPM: checksum does not match
SwiftPM: checksum does not match
iOS: module compiled with a newer Swift, or Swift interface errors
iOS: module compiled with a newer Swift, or Swift interface errors
iOS: 'no such module NeurofitVitals'
iOS: 'no such module NeurofitVitals'
NeurofitVitals product, and NeurofitVitalsUI for the pre-built flow, to the target that imports it
(General > Frameworks, Libraries, and Embedded Content). Source builds:
Install from source or manually.Android: 'Could not find com.neurofit:vitals-sdk:1.0.0'
Android: 'Could not find com.neurofit:vitals-sdk:1.0.0'
neurofit repository with its credentials to settings.gradle.kts
(Android quickstart).React Native, Flutter and Capacitor: the package carries the SDK in its android/maven folder and adds it to
your Android build. If android/settings.gradle sets repositoriesMode to PREFER_SETTINGS or
FAIL_ON_PROJECT_REPOS, Gradle ignores or rejects that repository, so list the folder there:FAIL_ON_PROJECT_REPOS, because its own Android modules declare repositories.start() throws invalidUsage
start() throws invalidUsage
start() must be called on the main thread (Android): call it from the
main thread, for example in lifecycleScope. The session is already running: call stop() first. A finished
or stopped session: create a new one (in the wrappers, start() does).Android: R8 strips something and the SDK crashes in release
Android: R8 strips something and the SDK crashes in release
consumer-rules.pro, which keeps the public API in com.neurofit.vitals.* (the top-level package
only, everything else is internal and meant to be shrunk). If your R8 configuration ignores consumer rules, copy
the rules on the Android API reference.Wrappers: events stop arriving after a hot reload
Wrappers: events stop arriving after a hot reload
stop() in your
cleanup, and start() again when the screen mounts.Diagnostics and support
The SDK sends nothing anywhere, so NEUROFIT cannot look a reading up. What your app records is what support works from.What to record
Keep these with each reading attempt, in your own logs or analytics:Contacting support
Write to contact@neurofit.app with:- the SDK version, the platform and OS version, and the device model
- the reading id and completion time, when the question is about a result
- the events you recorded for the attempt: the guidance that kept showing, the cancel reasons, the error
- what the user did, if you know it (seated or moving, phone on a table or in the hand, which finger)