0

I'm making a BB10 app with a headless component that's normally supposed to run nonstop, except when a certain field in its QSettings changes (to save battery power).

I tried looking everywhere for the documentation. But I still can't find out how to make a headless app terminate itself.

Rachel
  • 1

1 Answers1

0

You can get notified every time your settings file change using QFileSystemWatcher and calling bb::Application::instance()->quit() when a certain QSettings value changes. Here's an example from BlackBerry that uses QFileSystemWatcher in headless to get notification whenever the QSettings file changes.

I prefer using invocation or my own headless communication mechanism though, you can see an exemple of how I usually deals with terminating the headless app here.

Roger Leblanc
  • 1,543
  • 1
  • 10
  • 9