code: @Override
  	public void onActivityStopped(final Activity activity) {
  		if (foregroundActivities.decrementAndGet() < 0) {
  			ApptentiveLog.e("Incorrect number of foreground Activities encountered. Resetting to 0.");
  			foregroundActivities.set(0);
  		}
  
  		if (checkFgBgRoutine != null) {
  			delayedChecker.removeCallbacks(checkFgBgRoutine);
  		}
  
  		/* When one activity transits to another one, there is a brief period during which the former
  		 * is paused but the latter has not yet resumed. To prevent false negative, check routine is
  		 * delayed
  		 */
  		delayedChecker.postDelayed(checkFgBgRoutine = new Runnable() {
  			@Override
  			public void run() {
  				try {
  					if (foregroundActivities.get() == 0 && isAppForeground) {
  						appEnteredBackground();
  						isAppForeground = false;
  					}
  				} catch (Exception e) {
  					ApptentiveLog.e(e, "Exception in delayed checking");
  					ErrorMetrics.logException(e);
  				}
  			}
  		}, CHECK_DELAY_SHORT);
  
  		dispatchOnConversationQueue(new DispatchTask() {
  			@Override
  			protected void execute() {
  				ApptentiveNotificationCenter.defaultCenter()
  						.postNotification(NOTIFICATION_ACTIVITY_STOPPED, NOTIFICATION_KEY_ACTIVITY, activity);
  			}
  		});
  	}
docs: Decrements the count of running Activities. If it is now 0, start a task that will check again
  after a small delay. If that task still finds 0 running Activities, it will trigger an <code>appEnteredBackground()</code>
  @param activity