First some comments about the app itself...
It's a widget and has a large code base for a web API. That's why th e glance view only uses a small set code to display the glance view. This way I can keep the memory usage low to get glance view working.
But when the glance view is shown and I change app settings in ConnectIQ app, the onSettingsChanged() is called in the app.
In that case, the whole app code is loaded, not only the code defined wth (:glance). That crashed the app because the memory usage is to high for the glance view.
Can I somehow check in onSettingsChanged() if the app is currently in glance mode?
Then I can perhaps prevent using the API module to prevent the crash.