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

  • DialogFrag#show() from a Fragment throwing “IllegalStateException: Can not perform this action after onSaveInstanceState”
  • How to expand AppBarLayout when scrolling down reaches at top of the RecyclerView
  • ConnectivityManager getNetworkInfo(int) deprecated
  • Compare dates (stored as string) in android sqlite database?
  • Determine reason for odex file size bloat
  • Which Android IDE is better - Android Studio or Eclipse?
  • 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?

  • FragmentPagerAdapter getItem is not being triggered
  • Android Studio 2.0 Preview 2 issue with Renderscript
  • When to use synchronized in Java
  • Uploading Images to tumblr API from Android
  • Slow App with Background image
  • Android execute function after pressing “Enter” for EditText
  • 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.