@react-native-async-storage/async-storage
is used, but you can use any persistent storage system.RNFibriCheckView
exported from the @fibricheck/react-native-camera-sdk
package to perform a measurement and hook up sdk.postMeasurement
to post the data returned from the camera to the backend in the onMeasurementProcessed
event.sdk.canPerformMeasurement
. If you try to execute a measurement when you are not entitled, a NoActivePrescriptionError
will be thrown. So make sure you've Activated a Prescription.sdk.updateMeasurementContext
. More information about this can be found in the Measurement Structure.movementDetectionEnabled
to false on for example a onLongPress
authentication
function, the second parameter should be a callback function (this can also be an arrow function). This function will be called when legal documents have been updated in the FibriCheck cloud and the end-user needs to reapprove these. Example showing how to hook changes to legal documents change with your application and calling the giveConsent
function with the document after the user has approved these.sdk.getMeasurement
function to get a single measurement based on a id. Only measurements for the currently authenticated user can be requested.sdk.getMeasurements
will return a paginated result with all measurements for the currently authenticated user. You can find the measurements under the data
property. You can also use the next
and previous
functions present on the result to navigate through the user's measurents.sdk.getMeasurementReportUrl
accepts a measurementId
and will handle creation / fetching of the report. This function works great in combination with react-native-pdf
or react-native-share
sdk.getPeriodicReports
method will retrieve all your periodic reports..next()
to retrieve the next 20 reports. Another way to do this, is by using the for await construction (as seen in the example) trigger
field indicates for which period the report was made (7 days, 30 days or at the end of a prescription)@babel/plugin-proposal-async-generator-functions
is required. This plugin is included in @babel/preset-env
.sdk.getPeriodicReportPdf
method will retrieve a pdf-version of the periodic report.reportId
as a parameter.sdk.activatePrescription
method will link the prescription to the user and activate it.
This method takes the prescription'shash
as a parameter.sdk.updateProfile
function.