Using SDK 4.2.2 on the Ionic or simulator I am not seeing the onunload event fire on the companion app.
https://dev.fitbit.com/build/reference/companion-api/life-cycle/
I can see the relevant messages in the debug console:
Companion: Unloading companion…
Companion: Companion unloaded
but a console.log and some code which just updates a setting in the event handler never runs.
Other event handlers work so I don't think its anything obvious.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.