AfterStartup equivalent in offline Native app

0
What could be equivalent of AfterStartup in offline native app? That can be used for any app initialization logic and runs only once when user opens the app. 
asked
3 answers
1

Place an AppEvents widget on the native home page and put a nanoflow in the onload action. WIth recent Mendix releases the navigation allows a nanoflow call

answered
0

This might not be the cleanest solution, but it should work. Maybe someone else has a better idea:

Create a blank default homepage that only includes a button linked to the Nanoflow were you want to perform this start-up logic. Then use the HTML snippet widget to load some javascript that automatically clicks on that button. At the end of your nanoflow you could open the proper homepage.

answered
0

I was able to achieve my requirement using App Events widget.
Placed the App Events widget on home page. From the Timer tab, a configuration like this worked for me. It triggers the nanoflow only once when app is started. 

 

Other options like app events → on resume or on page load/unload will trigger the nanoflow multiple times. The above timer event set to once fulfilled my requirement of executing a nanoflow once when user launches the app

answered