How to create Test Device to Facebook Ads >> To Create Test Device you need Enter a device ID (IDFA, AAID):
sometimes we need to get the android advertisement id AAID for android device, when we place google ads or Facebook ads to our Android app or any other functions we need to place the unique AAID for testing purpose.
The first Step, get AdvertisingIdClient
public class AdvertisingIdClient extends Object Helper library for retrieval of advertising ID and related information such as the limit ad tracking setting.
It is intended that the advertising ID completely replace existing usage of other identifiers for ads purposes (such as use of ANDROID_ID in Settings.Secure) when Google Play Services is available. Cases, where Google Play Services is unavailable, are indicated by a GooglePlayServicesNotAvailableException being thrown by getAdvertisingIdInfo().
Code >>>
Open Your Logcate of android studio you will get Result like it
1aaf7707-22b5-4627-xxx-xxxxxxxx is your device ID Second Step: Open your Facebook Monetization Manager
write your device id in a device ID (IDFA, AAID): EditText and Write Name Device like the image.