Custom results screen
In this use case, you have your own questions or welcome screen, which is followed by the plug-in health scan, after which the results are displayed on your own custom results screen.
This guide will show you how to design this user flow seamlessly and display the results screen when you desire.
We will refer to the following documentation during this guide:
The steps to accomplish this are described below, accompanied by a figure displaying the steps.
1. Display your app's welcome screen.
2. Request the plug-in URL (see Request plug-in URL) and embed it in your app where desired (see Embed plug-in).
Important: please request us to disable the built-in results screen of the plug-in. This means that after the measurement is completed, the plug-in will not go to the results screen immediately. Instead, it will remain on the recording screen, giving you the opportunity to switch to your own screen, such as a questionnaire.
3. To determine when the measurement is completed and when to switch from the recording screen to your own results screen, listen for the Results event, Buckets and Bucket summaries. These contain all the results from the health scan in JSON format. Make sure to store this for use in the next step. Refer to our Message events documentation for more information about these events.
It's important to note that you might also receive a UserFinished event in case the user ends the health check without successfully completing it, for example, because the conditions for taking a health check aren't good enough. We recommend you take this into account when designing your own screen, e.g. by adapting the content accordingly.
4. Show your results screen and populate it with the information you obtained in the previous step. You are also free to save the data to your database for future analysis.