Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Admob Native Advanced

Discussion in 'Unity Ads' started by zeeshan077, Nov 18, 2017.

  1. zeeshan077

    zeeshan077

    Joined:
    Oct 2, 2017
    Posts:
    1
    Hello Guys n Galz,

    i just want know any one here worked on admob native advanced in unity?
     
  2. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,165
    Have you got access to their beta program? https://developers.google.com/admob/android/native-advanced says:

    /Rasmus
     
  3. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    118
    Me too, did you find out anything? Looks like currently AdMob plugin supports only Android / iOS. The only solution is to write own plugin to be able to call native advanced functionality from Unity?
     
  4. Saleem_Khan

    Saleem_Khan

    Joined:
    Jan 12, 2015
    Posts:
    3
    any updates on Admob native Advance ???
     
  5. Saleem_Khan

    Saleem_Khan

    Joined:
    Jan 12, 2015
    Posts:
    3
    if Anyone here integrated Admob Native Advance ads let me know , I'm working on it
     
  6. Alexey_Ukhov

    Alexey_Ukhov

    Joined:
    Sep 20, 2017
    Posts:
    5
    Hi! I integrate Admob Native Advance ads. I receive App install ad, but when I try get AdChoices Logo texture exception thrown on android
    Texture2D adChoicesLogoTexture = _appInstallAd.GetAdChoicesLogoTexture();

    AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.ads.formats.NativeAd$AdChoicesInfo.getImages()' on a null object reference
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.android.gms.ads.formats.NativeAd$AdChoicesInfo.getImages()' on a null object reference
    at com.google.unity.ads.NativeAdvancedAppInstallAd.getAdChoicesLogo(Unknown Source)

    Other textures and text get normally. Any suggestions?
     
    sathya likes this.
  7. sathya

    sathya

    Joined:
    Jul 30, 2012
    Posts:
    228
    So do i. It spams the following message

    NullReferenceException: Object reference not set to an instance of an object
    at _7DwxoIFqo4msA2gd7qefalu8Sdo._0l2RBGguR8VFeD0boB90jm7FgPF () [0x00000] in <filename unknown>:0
    at _7DwxoIFqo4msA2gd7qefalu8Sdo.CheckForImpressionWithoutRenderer () [0x00000] in <filename unknown>:0
     
  8. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    118
    Downloaded Native Advanced Plugin from here: https://developers.google.com/admob/unity/native-advanced

    Successfully integrated, no errors. Android works like a charm, but iOS has significant memory usage, comparison:

    Android Studio Memory Profile:
    memory_android.jpg

    xCode Memory Profile:
    memory_xcode.jpg

    So I see two problems with iOS Native Advanced Support:
    1. While Android plugin implementation utilizes only 20 Mb for Native Ad, iOS uses 120 - 200 Mb for some reason - this brings a lot of crashes on non-top Apple devices.
    2. iOS plugin doesn't free memory after usage.

    Do anyone have positive experience of iOS integration? I've tried Ad Mob plugin from February of 2018, and now latest from here: https://developers.google.com/admob/unity/native-advanced. Memory usage pretty the same, does this expected behavior?
     
    SyedUmair likes this.
  9. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    118
  10. ds17

    ds17

    Joined:
    Sep 18, 2018
    Posts:
    1

    Attached Files:

  11. SyedUmair

    SyedUmair

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hey, guys. I have created native ad UI using Raw Images & Text components of Unity GUI, it has been loaded successfully. But I am unable to click on the ad. Any leads, what could be the issue?
    One issue could be, I have created dummy camera which has no purpose in the scene but to avoid null reference exception, thrown by UnityEngine.GeometryUtility.CalculateFrustumPlanes due to some internal calling of the admob SDK.
    PS. I have registered my raw images and Texts using native ads' register methods.

    Thanks,
     
  12. aemobile_zq

    aemobile_zq

    Joined:
    Mar 29, 2016
    Posts:
    6
    I had the same problem...
     
  13. SyedUmair

    SyedUmair

    Joined:
    Sep 2, 2013
    Posts:
    33
    I have fixed it by setting my canvas to Screen Space - Camera and assigning the camera to canvas.
     
  14. aemobile_zq

    aemobile_zq

    Joined:
    Mar 29, 2016
    Posts:
    6
    thank you so much. i fixed it.
     
  15. st1991

    st1991

    Joined:
    Dec 15, 2015
    Posts:
    4
  16. HoBaCo0303

    HoBaCo0303

    Joined:
    May 28, 2018
    Posts:
    1
    Thanks for your script, but I have a problem while I tried to create UI, "Failed to register GameObject for ad asset: GameObjects registered for native advanced ad assets must have a Collider component". Please share project full or scene setup.
     
  17. KVinS

    KVinS

    Joined:
    Aug 27, 2013
    Posts:
    6
    I do not really understand whether it is possible to use the GUI? After all, we need a collider at the GameObject...