Here is an example of how the code looks like:
AdRequest request = new AdRequest.Builder()
You need to find the unique hashed device id to add it to your code. The simplest way to find it in Android Studio is to look at the logcat in Android Monitor.
Here are the steps:
- Connect your test device with drivers installed, Developer Options and USB debugging enabled.
- In the bottom of Android Studio, click on Android Monitor and make sure the tab logcat is active.
- You will see a lot of messages. Type addTestDevice in the search field to filter the text.
- You will find your unique hashed device id in the results.
If you cannot find it using the logcat then you can use an app that displays the same device id.
Here is the link to the application in Google’s Play Store.
I hope that helps you out in testing your advertisements and monetizing your application.