TestAdSelectionManager
  public
  
  
  
  class
  TestAdSelectionManager
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.adservices.adselection.TestAdSelectionManager | 
TestAdSelectionManager provides APIs for apps and ad SDKs to test ad selection processes.
 
These APIs are intended to be used for end-to-end testing. They are enabled only for debuggable apps on phones running a debuggable OS build with developer options enabled.
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 or AdServicesPermissions.ACCESS_ADSERVICES_PROTECTED_SIGNALS or AdServicesPermissions.ACCESS_ADSERVICES_AD_SELECTION
| Parameters | |
|---|---|
| request | AddAdSelectionOverrideRequest: This value cannot benull. | 
| executor | Executor: This value cannot benull.
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| 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 or AdServicesPermissions.ACCESS_ADSERVICES_PROTECTED_SIGNALS or AdServicesPermissions.ACCESS_ADSERVICES_AD_SELECTION
| Parameters | |
|---|---|
| request | AddAdSelectionFromOutcomesOverrideRequest: This value cannot benull. | 
| executor | Executor: This value cannot benull.
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| 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 or AdServicesPermissions.ACCESS_ADSERVICES_PROTECTED_SIGNALS or AdServicesPermissions.ACCESS_ADSERVICES_AD_SELECTION
| Parameters | |
|---|---|
| request | RemoveAdSelectionOverrideRequest: This value cannot benull. | 
| executor | Executor: This value cannot benull.
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| 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 or AdServicesPermissions.ACCESS_ADSERVICES_PROTECTED_SIGNALS or AdServicesPermissions.ACCESS_ADSERVICES_AD_SELECTION
| Parameters | |
|---|---|
| request | RemoveAdSelectionFromOutcomesOverrideRequest: This value cannot benull. | 
| executor | Executor: This value cannot benull.
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| 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 or AdServicesPermissions.ACCESS_ADSERVICES_PROTECTED_SIGNALS or AdServicesPermissions.ACCESS_ADSERVICES_AD_SELECTION
| Parameters | |
|---|---|
| executor | Executor: This value cannot benull.
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| 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 or AdServicesPermissions.ACCESS_ADSERVICES_PROTECTED_SIGNALS or AdServicesPermissions.ACCESS_ADSERVICES_AD_SELECTION
| Parameters | |
|---|---|
| executor | Executor: This value cannot benull.
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| Throws | |
|---|---|
| IllegalStateException | if this API is not enabled for the caller The receiver either returns a  | 
