OnApplicationPause() not called on Windows Store when suspending

I am developing a game for Windows Phone and Windows Store.
When the game is suspended (that is, it is no longer in the foreground) I need to save the game state (current level, scores, etc.).
To do that, I define the OnApplicationPause() function on a game object on which I called DontDestroyOnLoad().
OnApplicationPause(false) is called at startup on both Windows Store and Windows Phone.
When the game is suspended (goes to the background), OnApplicationPause(true) is called on Windows Phone, but it is NOT called on Windows Store.

  • Is this behavior expected?
  • How can I correctly detect that the game is suspended on Windows Store?

I am using Windows Store 8.1 and Windows Phone 8.1.

I finally found the reason for this: the Player settings had the “Run in Background” flag set to true. This was causing this behavior.
With “Run in Background” set to false, OnApplicationPause(true) is called.