are ad unit id and ppublisher id same?

I am new to android applications dev . I am preparing an application which should display Admob at the bottom, for that i crated an ac in Admob and got a publisher id and placed in my code.

But client gave me integration details as

  • Android skip activity on back button press
  • Updating sdk got NoClassDefFoundError for zxing
  • Android List View set default position without animation
  • HttpURLConnection wire logging in Android
  • Pause the timer and then continue it
  • Android WebView safe font family?
  • adunit ID –

    xxxx (five digit number)

    Here is the app ID:

    0axxxxxb-xxdx-xxxa-xxxx-cxxbxxxxxaxx (here x’s are numbers)

    my question is, are both adunit id and publisher id same? If so I have publisher id with 15 dig number…but adunit id is only 5 dig what should i do now?

    Related posts:

    Android kernel compile and test with Android Emulator
    Android, Best way to provide app specific constants in a library project?
    Android: switch to a different IME programmatically
    Make new activity appear behind old one during transition
    Android 4.2.2 - adb offline, even after SDK upgrade
    android: How to use custom colors?
  • Remove space between buttons
  • Android get bounding rectangle of a View
  • Android Property Animation
  • Is there any way use new DrawerLayout with ActionBarSharlock?
  • android ellipsize multiline textview
  • How to create reusable activities in Android?
  • 3 Solutions collect form web for “are ad unit id and ppublisher id same?”

    I would say it’s the same thing based on the official Admob’s documentations

    The five lines of code it takes to add
    a banner:

    • Import com.google.ads.*
    • Declare an AdView instance
    • Create it, specifying a unit ID—your AdMob publisher ID
    • Add the view to the UI
    • Load it with an ad

    Clarify with your client.

    No, PublisherId is unique account id whereas ad Unit id is id per application.

    I get the adUnitId using this method running from the onCreate() method from my app.

    public void getIdThread() {
        new Thread(new Runnable() {         
            @Override
            public void run() {
        // Do not call this function from the main thread. Otherwise, 
        // an IllegalStateException will be thrown.
        Info adInfo = null;
        try {
            adInfo = AdvertisingIdClient.getAdvertisingIdInfo(getApplicationContext());
            Log.d("AD_INFO", "adInfo :: " +adInfo);
        } catch (IOException e) {
            // Unrecoverable error connecting to Google Play services (e.g.,
            // the old version of the service doesn't support getting AdvertisingId).
    
        } catch (GooglePlayServicesNotAvailableException e) {
            // Google Play services is not available entirely.
        } catch (IllegalStateException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (GooglePlayServicesRepairableException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        final String adUnitId = adInfo.getId();
        final boolean isLAT = adInfo.isLimitAdTrackingEnabled();
        Log.d("AD_INFO", "adUnitId :: " +adUnitId);
        Log.d("AD_INFO", "isLAT :: " +isLAT);
            }
        }).start();
    }
    

    and this is the format of an adUnitId:

    da123eb7-19a9-43aa-a98b-9ae24de45f25
    
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.