SdkSandboxClientImportanceListenerCompat


public interface SdkSandboxClientImportanceListenerCompat


Used to notify the SDK about changes in the client's android.app.ActivityManager.RunningAppProcessInfo.importance.

When an SDK wants to get notified about changes in client's importance, it should register an implementation of this interface by calling androidx.privacysandbox.sdkruntime.core.controller.SdkSandboxControllerCompat.registerSdkSandboxClientImportanceListener.

Summary

Public methods

abstract void
onForegroundImportanceChanged(boolean isForeground)

Invoked every time the client transitions from a value <= android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND to a higher value or vice versa.

Public methods

onForegroundImportanceChanged

Added in 1.0.0-alpha16
abstract void onForegroundImportanceChanged(boolean isForeground)

Invoked every time the client transitions from a value <= android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND to a higher value or vice versa.

Parameters
boolean isForeground

true when the client transitions to android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND or lower and false when it is the other way round.