Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
TraceAttributes::ANDROID_STATE
public const ANDROID_STATE_BACKGROUND = 'background';