TestAdSelectionManager
public
class
TestAdSelectionManager
extends Object
java.lang.Object | |
↳ | android.adservices.adselection.TestAdSelectionManager |
TestAdSelectionManager provides APIs for app and ad-SDKs to test ad selection processes as well as report impressions.
Summary
Inherited methods | |
---|---|
Public methods
overrideAdSelectionConfigRemoteInfo
public void overrideAdSelectionConfigRemoteInfo (AddAdSelectionOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
Overrides the AdSelection API for a given AdSelectionConfig
to avoid fetching data
from remote servers and use the data provided in AddAdSelectionOverrideRequest
instead. The AddAdSelectionOverrideRequest
is provided by the Ads SDK.
This method is intended to be used for end-to-end testing. This API is enabled only for
apps in debug mode with developer options enabled.
Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
Parameters | |
---|---|
request |
AddAdSelectionOverrideRequest : This value cannot be null . |
executor |
Executor : This value cannot be null .
|
receiver |
OutcomeReceiver : This value cannot be null . |
Throws | |
---|---|
IllegalStateException |
if this API is not enabled for the caller
The receiver either returns a |
overrideAdSelectionFromOutcomesConfigRemoteInfo
public void overrideAdSelectionFromOutcomesConfigRemoteInfo (AddAdSelectionFromOutcomesOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
Overrides the AdSelection API for AdSelectionFromOutcomesConfig
to avoid fetching
data from remote servers and use the data provided in AddAdSelectionFromOutcomesOverrideRequest
instead. The AddAdSelectionFromOutcomesOverrideRequest
is provided by the Ads SDK.
This method is intended to be used for end-to-end testing. This API is enabled only for
apps in debug mode with developer options enabled.
Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
Parameters | |
---|---|
request |
AddAdSelectionFromOutcomesOverrideRequest : This value cannot be null . |
executor |
Executor : This value cannot be null .
|
receiver |
OutcomeReceiver : This value cannot be null . |
Throws | |
---|---|
IllegalStateException |
if this API is not enabled for the caller
The receiver either returns a |
removeAdSelectionConfigRemoteInfoOverride
public void removeAdSelectionConfigRemoteInfoOverride (RemoveAdSelectionOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
Removes an override for AdSelectionConfig
in the Ad Selection API with associated the
data in RemoveAdSelectionOverrideRequest
. The RemoveAdSelectionOverrideRequest
is provided by the Ads SDK.
This method is intended to be used for end-to-end testing. This API is enabled only for
apps in debug mode with developer options enabled.
Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
Parameters | |
---|---|
request |
RemoveAdSelectionOverrideRequest : This value cannot be null . |
executor |
Executor : This value cannot be null .
|
receiver |
OutcomeReceiver : This value cannot be null . |
Throws | |
---|---|
IllegalStateException |
if this API is not enabled for the caller
The receiver either returns a |
removeAdSelectionFromOutcomesConfigRemoteInfoOverride
public void removeAdSelectionFromOutcomesConfigRemoteInfoOverride (RemoveAdSelectionFromOutcomesOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
Removes an override for AdSelectionFromOutcomesConfig
in th Ad Selection API with
associated the data in RemoveAdSelectionOverrideRequest
. The RemoveAdSelectionOverrideRequest
is provided by the Ads SDK.
This method is intended to be used for end-to-end testing. This API is enabled only for
apps in debug mode with developer options enabled.
Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
Parameters | |
---|---|
request |
RemoveAdSelectionFromOutcomesOverrideRequest : This value cannot be null . |
executor |
Executor : This value cannot be null .
|
receiver |
OutcomeReceiver : This value cannot be null . |
Throws | |
---|---|
IllegalStateException |
if this API is not enabled for the caller
The receiver either returns a |
resetAllAdSelectionConfigRemoteOverrides
public void resetAllAdSelectionConfigRemoteOverrides (Executor executor, OutcomeReceiver<Object, Exception> receiver)
Removes all override data for AdSelectionConfig
in the Ad Selection API.
This method is intended to be used for end-to-end testing. This API is enabled only for
apps in debug mode with developer options enabled.
Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
Parameters | |
---|---|
executor |
Executor : This value cannot be null .
|
receiver |
OutcomeReceiver : This value cannot be null . |
Throws | |
---|---|
IllegalStateException |
if this API is not enabled for the caller
The receiver either returns a |
resetAllAdSelectionFromOutcomesConfigRemoteOverrides
public void resetAllAdSelectionFromOutcomesConfigRemoteOverrides (Executor executor, OutcomeReceiver<Object, Exception> receiver)
Removes all override data for AdSelectionFromOutcomesConfig
in the Ad Selection API.
This method is intended to be used for end-to-end testing. This API is enabled only for
apps in debug mode with developer options enabled.
Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
Parameters | |
---|---|
executor |
Executor : This value cannot be null .
|
receiver |
OutcomeReceiver : This value cannot be null . |
Throws | |
---|---|
IllegalStateException |
if this API is not enabled for the caller
The receiver either returns a |