prebid-mobile-android icon indicating copy to clipboard operation
prebid-mobile-android copied to clipboard

Question about getting ExpandProperties when the ad is MRAID but is not expandable

Open elq81hc opened this issue 7 months ago • 4 comments

protected void MraidContinue() {
      if (!hasExpandProperties) {
          //1st always false. so this always happens 1st.
          loadExpandProperties();
      } else {
          init();
      }
  }

Can you share with me the idea of why we need to get ExpandProperties when the ad is MRAID the first time, even if it is not an expandable ad? I don't see such logic on the iOS side @YuriyVelichkoPI, @mdanylov-sigma

elq81hc avatar Jun 15 '25 07:06 elq81hc

@ValentinPostindustria could you take a look at this question?

YuriyVelichkoPI avatar Jul 07 '25 06:07 YuriyVelichkoPI

This code is a little confusing, but the logic is simple. It always loads expand properties first and only then initializes everything else. We can't know if there is an expandable ad or not, so we do this getExpandProperties() on start.

Comment from code:

         * If it's MRAID, we have to check the Ad designer's request to launch
         * the ad in a particular expanded size by checking the ad's
         * ExpandProperties per the MRAID spec. So we go to the js and extract these
         * properties and then the layout gets built based on these things.

Does this logic break some of your examples?

ValentinPostindustria avatar Jul 07 '25 10:07 ValentinPostindustria

Hi @elq81hc ! Does Valentin's answer make sense to you? Can we close the issue if no other questions?

YuriyVelichkoPI avatar Aug 18 '25 12:08 YuriyVelichkoPI

Hi @YuriyVelichkoPI, sorry for my late response. When rendering a display interstitial, MraidContinue() is also called here, do we need to get ExpandProperties for fullscreen ads?

elq81hc avatar Aug 25 '25 16:08 elq81hc