AdIdManager
  public
  
  
  
  class
  AdIdManager
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.adservices.adid.AdIdManager | 
AdId Manager provides APIs for app and ad-SDKs to access advertising ID. The advertising ID is a unique, per-device, user-resettable ID for advertising. It gives users better controls and provides developers with a simple, standard system to continue to monetize their apps via personalized ads (formerly known as interest-based ads).
Summary
| Public methods | |
|---|---|
| 
        
        
        static
        
        
        AdIdManager | 
      get(Context context)
      Factory method for creating an instance of AdIdManager. | 
| 
        
        
        
        
        
        void | 
      getAdId(Executor executor, AdServicesOutcomeReceiver<AdId, Exception> callback)
      
      This method was deprecated
      in API level 36.
    use  | 
| 
        
        
        
        
        
        void | 
      getAdId(Executor executor, OutcomeReceiver<AdId, Exception> callback)
      Return the AdId. | 
| Inherited methods | |
|---|---|
Public methods
get
public static AdIdManager get (Context context)
Factory method for creating an instance of AdIdManager.
| Parameters | |
|---|---|
| context | Context: TheContextto use
 This value cannot benull. | 
| Returns | |
|---|---|
| AdIdManager | A AdIdManagerinstance
 This value cannot benull. | 
getAdId
public void getAdId (Executor executor, AdServicesOutcomeReceiver<AdId, Exception> callback)
      This method was deprecated
      in API level 36.
    use getAdId(java.util.concurrent.Executor, android.os.OutcomeReceiver) instead. Android R is no longer
     supported.
  
Return the AdId. For use on Android R or lower.
 
 Requires AdServicesPermissions.ACCESS_ADSERVICES_AD_ID
| Parameters | |
|---|---|
| executor | Executor: The executor to run callback.
 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. | 
| callback | AdServicesOutcomeReceiver: The callback that's called after adid are available or an error occurs.
 This value cannot benull. | 
| Returns | |
|---|---|
| void | This value cannot be null. | 
getAdId
public void getAdId (Executor executor, OutcomeReceiver<AdId, Exception> callback)
Return the AdId.
 
 Requires AdServicesPermissions.ACCESS_ADSERVICES_AD_ID
| Parameters | |
|---|---|
| executor | Executor: The executor to run callback.
 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. | 
| callback | OutcomeReceiver: The callback that's called after adid are available or an error occurs.
 This value cannot benull. | 
| Returns | |
|---|---|
| void | This value cannot be null. | 
