public AppliveryActivityLifecycleCallbacks(Context applicationContext) {
   LastConfigReader lastConfigReader = new AndroidLastConfigReaderImpl();
   this.appConfigChecker = new AppConfigChecker(lastConfigReader);
   this.applicationContext = applicationContext;
   this.sensorEventsController = SensorEventsController.getInstance(applicationContext);
   this.screenshotObserver = ScreenshotObserver.getInstance(applicationContext);
 }
 private void appWillEnterBackground() {
   sensorEventsController.unRegisterAllSensorsForApplication();
   screenshotObserver.stopObserving();
 }
 private void appWillReturnfromBackground() {
   checkForUpdates();
   sensorEventsController.registerAllSensorsForApplication();
   screenshotObserver.startObserving();
 }