SdkSandboxClientImportanceListenerCompat


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 functions

Unit

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

Public functions

onForegroundImportanceChanged

Added in 1.0.0-alpha17
fun onForegroundImportanceChanged(isForeground: Boolean): Unit

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

Parameters
isForeground: Boolean

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