Search Unity

IAP Promo Placement state always NoFill [Android]

Discussion in 'Unity Ads & User Acquisition' started by tencity, Apr 26, 2018.

  1. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    Hi - trying out the new IAP Promos, currently listed in beta on the dashboard.

    I've setup the product catalog, placements and promos, uploaded creative, added IAP products to play store etc. I've added debugging which checks that Advertisements are initialized, that the IAP product is available and loaded etc. Everything returns true/yes/good to go.

    But Advertisement.isReady() is always false for my placementID, and Advertisement.GetPlacementState() always returns 'NoFill'. I'm testing on my Android phone, where rewardedVideo works fine btw.

    Am I doing something wrong, or has the 'data science' behind the scenes decided that none of the available promo products are suitable for me? And if so, how can I see what the adverts look like on my phone, to test them?

    thanks,
    Nick
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Just to make sure, you have configured a IAP Promo campaign under "IAP Promotions"?

    /Rasmus
     
  3. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    I think so, yes. Screenshot attached: a single promotion with 3 products and a placement.



    promo01.jpg
     
  4. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    Further to this, which may or may not have anything to do with it, I haven't added prices to any of the products I uploaded. So the IAP Products page shows 0 USD for the Apple App Store price and Google Play Store price.

    I left these fields blank because my game retrieves the localized price string from the product metadata at runtime. I can fill them in though, if that's whats going to make the difference?
     
  5. elora_k

    elora_k

    Joined:
    Sep 20, 2016
    Posts:
    39
    Hi,

    Have the price set to 0 shouldn't be the issue, but it is important to have that price listed for the Product. Our system pulls the localized price for your users when we show the promo. Your products also need to match what you've registered with Apple and Google.

    In terms of the issue of not seeing promos, could you double check that you are initializing the IAP SDK before you initialize the Ads SDK? We recommend initializing Ads in these functions of your purchase script:
    • public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
    • public void OnInitializeFailed(InitializationFailureReason error)
    This will ensure that the Ads SDK gets the product information from the IAP SDK (and store), which is needed to show the promo.

    If this doesn't seem to be your issue, I recommend looking at a device log to see what errors might be occurring. Feel free to post it here or, if you would like, send us an email at unityads-support@unity3d.com with the log and reference to this post. We are happy to help further!
     
  6. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    Thanks Elora, i'm initializing the SDKs the other way around so that's almost certainly going to be the problem.

    I'm using my own script for the IAPs, but the 'codeless' system for the Advertisements (setup thorugh the services window), so I guess one of those will have to change in order for me to force the IAP initialization first?

    There's no way for me to prevent the automatic initialization of the Advertisements without switching to the 'manual' setup version?

    EDIT:
    Just as a suggestion for the setup page (https://docs.unity3d.com/Manual/IAPPromoIntegration.html), I interpreted the instructions on that page to initialize the IAPs before the Ads as a recommendation rather than a requirement. I thought that as long as I check that my IAP products are available then that would be enough. I can see now that it's essential.

    EDIT 2:
    Actually it does say thats Ads must be initialized first, my apologies! I'll RTFM next time!
     
    Last edited: Apr 27, 2018
  7. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    All working now, thanks.
     
    elora_k likes this.
  8. TEXMOB

    TEXMOB

    Joined:
    Aug 29, 2017
    Posts:
    4
    \
    i do exactly like you but still dont show IAPpromo.
    my step are
    1 - disable auto initialize unityads.
    2 - initialize iap and return "OnInitialized IAP: PASS"
    3 - in next scene i initialize unityads
    i have configured a IAP Promo on dashboard
    i think maybe i set wrong productId in iap.
    please help.
     
  9. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    what do these return when you try to show the promo?:

    Advertisement.isInitialized
    Advertisement.GetPlacementState("yourPlacementID")
    Advertisement.IsReady("yourPlacementID")

    and also:

    yourIAPproduct.availableToPurchase
     
  10. TEXMOB

    TEXMOB

    Joined:
    Aug 29, 2017
    Posts:
    4
    Thank you reply:
    my debug are like that
    Advertisement.isInitialized returun true
    Advertisement.GetPlacementState("rewardedVideo") return ready
    Advertisement.GetPlacementState("testPromo") return nofill
    Advertisement.IsReady("rewardedVideo") return true
    Advertisement.IsReady("testPromo") return false

    about myIAPproduct had set on google store. but i'm not public yet. so when i try click buy google show "the item you requsted is not available for purchase "
     
  11. tencity

    tencity

    Joined:
    Sep 8, 2015
    Posts:
    14
    Ah I think that the problem may be that there is no IAP to promote.

    Have you released the apk to 'Beta' from the Release Management section of the Android console? That will make the IAP available to you for testing, but the public can't see it.

    I suggest also you setup a temporary button to allow you to make a test purchase of your IAP without using the Promo system. Then when you can successfully buy it normally, try the Promo again?
     
    elora_k likes this.
  12. TEXMOB

    TEXMOB

    Joined:
    Aug 29, 2017
    Posts:
    4
    thank you for suggesting. i will do late. now i think so switch to other task
     
  13. burakBayboga

    burakBayboga

    Joined:
    Apr 3, 2018
    Posts:
    1
    I can buy the products that are included in the promotion just fine seperately. But Advertisement.GetPlacementState("placementID") still returns NoFill and Advertisement.IsReady("placementID") still returns false. Only Advertisement.isInitialized() returns true. The docs just say "Placement has no advertisements to show." about the NoFill return value. It's not helpful at all. I made sure that IAP gets initialized before ads. Any other suggestions? Thanks in advance.

    Edit: In the developer dashboard store settings ad placements section my placement says it's enabled. In the IAP Promo sections of the dashboard everything seems to be in order. Placement is configured, catalog items are promotion eligible and promotion status is active. I am really stumped at this point and Unity could really be more helpful when it comes to these kinds of errors.

    Edit: I finally got it working. I don't really know which of the things I tried made it work, most of it was project specific. But I think updating Unity Ads did it for me.
     
    Last edited: Jun 5, 2018
  14. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    186
    To anyone that comes across this issue, I had the exact same problem because I'm still using Unity 5.6.X, the issue was that the Ads plugin download via Services wasn't the right version!

    To check if your ad support version just:
    Code (CSharp):
    1. Debug.Log(Advertisement.version);
    If the version is lower than 2.2 you need to download from the Asset store the new SDK:
    https://assetstore.unity.com/packages/add-ons/services/unity-ads-66123

    Remember to deactivate "Enable built-in Ads Extension" on the Ads service in your Unity editor.

    Hope it helps someone
     
    reigota likes this.