You can use the following steps to perform ‘client side’ navigation between dashboards in SharpTools (using Fully Kiosk Browser’s API) which should result in the same fast navigation you are accustom to when tapping on dashboard tiles within a dashboard:
1. Note the URL Path to your Dashboard
Open your desired dashboard and make note of the path. For example, if my full dashboard URL was:
https://sharptools.io/dashboard/view/XXXXX
We just want the path at the end:
/dashboard/view/XXXXX
2. Fill in the postMessage template
Using the special postMessage API that SharpTools exposes, we can tell the browser to perform a client-side navigation to a dashboard rather than loading the URL as a new page.
The API takes the format:
postMessage({action:'navigate', route: { path: '/your/path/here'}})
And since we’re using the command within Fully Kiosk Browsers loadURL
command, we must prepend javascript:
to the beginning of it. So using our example above, our postMessage command would be:
javascript:postMessage({action:'navigate', route: { path: '/dashboard/view/XXXXX'}})
3. Use the result in the Fully Kiosk Browser loadURL command
Take the formatted postMessage command from the previous step and use it as the content of your loadURL command:
Important: this type of fast client side routing will only work when a SharpTools.io dashboard (or page) is already loaded in Fully Kiosk Browser. This is perfect for navigating between different SharpTools dashboards, but won’t work if you have a different website loaded in Fully Kiosk Browser for some reason.