observer background/foreground instead of active/resignactive, fixes #83