• Home
  • How To’s
  • Error Fixes
  • Apps
  • Basic Tutorials
  • Lists
  • Developers
How to Droid

Type and hit Enter to search

  • Home
  • How To’s
  • Error Fixes
  • Apps
  • Basic Tutorials
  • Lists
  • Developers
How to Droid
  • Home
  • How To’s
  • Error Fixes
  • Apps
  • Basic Tutorials
  • Lists
  • Developers
  • Home
  • How To’s
  • Error Fixes
  • Apps
  • Basic Tutorials
  • Lists
  • Developers
Androiddevelopers

How to Find Hashed Device ID for Admob Ads Testing in Android Studio

2 Mins Read
1 Comment

If you are trying to integrate admob advertisements, then it is wise to test it first. During development, it is recommended that you avoid false ad impressions as well as clicks. For that purpose, it is widely suggested that you just use test advertisements which displays a placeholder instead of a live advertisement. To get such test ads, you need to pass your hashed device ID to to AdRequest.Builder.addTestDevice().

Here is an example of how the code looks like:

AdRequest request = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR) 
.addTestDevice(“A2435BEFF94D5EFCFA0F050455C56347”)
.build();

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.

Finding Hashed Device Code

If you cannot find it using the logcat then you can use an app that displays the same device id.

Finding Hashed Code for your Device

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.

Tags:

Android Studio

Share Article

Other Articles

Previous

How to Use Multi-Locale Feature in Android Nougat

Next

Access Media on Your Android Phone with BubbleUPnP and VLC

Next
December 10, 2016

Access Media on Your Android Phone with BubbleUPnP and VLC

Previews
September 7, 2016

How to Use Multi-Locale Feature in Android Nougat

One Comment

  1. Ashir Mehmood says:
    June 25, 2020 at 3:48 am

    Thanks It helped.

    Reply
  2. Felipe says:
    September 24, 2020 at 1:02 pm

    Is app for finding your device ID for Admob working correctly ? I ‘ve read on some forum that the result is wrong…

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Terms of Service | Privacy Policy | Copyright © All Rights Reserved ®

  • Home
  • How To’s
  • Error Fixes
  • Apps
  • Basic Tutorials
  • Lists
  • Developers
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT