By background, I mean none of the application\'s activities are currently visible to the user?
What about using getApplicationState().isInForeground() ?