Each page can call a single built-in function. This function may require additional inputs, and, once it's done processing, will go to the next screen, depending on the outcome of the function. (e.g. a function could either 'succeed' or 'fail', and a separate new page for either outcome can be specified).
Requirements listed here need to be satisfied in order for the application to run. If one is not met, this page will cause an error, or the application might even crash.
States or values that will be changed for the whole application (such as connecting to a server, or setting a value) will be listed here.
Function exits are possible outcomes of a function. For instance, a function could succeed, fail, or be missing an input. The three exists could be named
- On success
- On fail
- On missing input
Each exit needs a target to go to, i.e. another page to jump to once this exit is reached.
- if: Compare two values, and choose a page depending on the result
- switch: Evaluate a variable. Choose a page for different options of the variable.
- checkInternet: Ping a server with good uptime (google.com) to ensure that the application has access to the internet
- scanQRScanner: Use the phone's camera to scan a scanner's QR code to pair with it
- scanQRGeneric: Use the phone's camera to scan a QR code, and store its content in a variable
- fetchScannerWifi: Send the scanner's serial number to the biozoom server, and retrieve the scanner's wifi name
- validateScanner: Attempt to connect to the scanner, and verify whether the scanner is valid
- checkFirmware: Check whether the scanner's firmware is up-to-date
- updateFirmware: Update a scanner's firmware
- updateFirmwareUSB: Update a scanner's firmware via a combination of USB and WiFi
- clearScannerFlash: Clear a scanner's flash storage
- deleteSerial: Un-pair the currently connected scanner
- connectScanner: Connect to the registered scanner
- getScannerFirmware: Check the scanner's firmware, and ensure it's compatible with the app
- handOnRecognition: Wait for the user's hand to cover the scanner
- measureAOX: Perform a single AOX measurement
- measureAOXHalf: Perform a single AOX half-measurement
- measureAOXSplit: Perform a single AOX split-measurement
- measureHeartTest: Test whether the heartrate can be measured properly, i.e. whether the hand is placed on the scanner correctly
- initMeasureHeart: Perform a heartrate measurement
- getMeasurementHeart: Retrieve a heartrate measurement from the scanner
- handOffRecognition: Wait for the user's hand to no longer cover the scanner
- repeatMeasurement: Check whether a sufficient amount of raw measurements has been stored
- connectToServer: Disconnect from the scanner, and connect to the measurement server
- uploadDataAOX: Upload a single AOX measurement, and receive the calculated result
- uploadDataHeartTest: Upload a heartrate test measurement to the calculation server to check whether the hand is placed properly
- uploadDataHeart: Upload a heartrate measurement to the calculation server, and have it evaluated
- repeatUpload: Check whether a sufficient amount of valid and useable measurement results has been stored
- deleteResult: Delete the latest measurement
- fetchResult: Upload all measurement results to the server, and receive a unified result
- displayResults: Display the final result by displaying a biozoom-website in the device's browser
- genResultURL: Calculate a result URL for a measurement result, usually to be displayed in a QR code
- getConfig: Fetch the latest version of the config for the currently paired scanner
- stashMeasurement: Store an AOX measurement in the device's storage
- popMeasurement: Retrieve a measurement from the device's storage, and upload it to the server
- cleanupMeasurement: Delete a measurement from the device's storage
- measureHeartTest: Test whether the heartrate can be measured properly, i.e. whether the hand is placed on the scanner correctly
- copyValues: Copy a number of values between sub-stores of the value store
- setValues: Set a number of values in the value store. These values can be calculated using functions.
- splitString: Split a string from the value store. The resulting array is stored in the store.
- parseJSON: Attempt to take a string from the value store and parse it as a JSON. The resulting JSON is stored in the store.
- pushToResultArray: Take a value from the value store, and push it to the array of results that can be exported by the user.
- exportResults: Export all cached results as a .csv file and share it via the system's media share feature.
- deleteResults: Clear the cache of all stored measurement resultss.
- genResultTable: Generate a partial URL needed to display the measurement results as a table.
- refresh: Fetch the newest version of the scanner's assigned configuration
- getRequest: Send a generic get-request to a target server, and store the result in a variable
- postRequest: Send a generic post-request to a target server (see here for which data is sent)
- downloadMedia: Download a single image from an image directory
- updateApp: Attempt to update the application (only if it was not installed via the app store)
- print: Take a picture of the current screen and print it via any printer found in the local network.
- resetAll: Reset all measurements and results, ensuring that the next measurement starts without any 'old' data