Perhaps this will work for you.
I added the AppEvents widget to the page layout that was used on my Native page(s) and applied the timer on this AppEvents widget.
I added a simple microflow that logged to log messages. 1 at the start and 1 at the end.
The nanoflow executes every 10 seconds and even when the page is changed.
If you are concerned that you might not be able to retrieve context information via the nanoflow for the task, I was able to retrieve data in this nanoflow.
If you execute the nanoflow asynchronously, it will continue to run without being bound to the UI context/page. You can do this in a javascript action by passing in the nanoflow as an argument. Such a javascript action would look something like this:
export async function ExecuteNanoflowInBackground(nanoflow) {
// BEGIN USER CODE
nanoflow();
return;
// END USER CODE
}
And here’s what it would look like to pass the nanoflow into the JS action: