Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
554 views
in Technique[技术] by (71.8m points)

Flutter admob mediation with Facebook Audience Network: how to customize ad display?

I have a flutter social network app with admob native ads working fine, and I would like to implement mediation with Facebook Audience Network. I configured everything on Admob and imported the SDK, the ads impressions are OK.

But this is how Facebook ads are displayed (which is not great, Admob ads fill all the space available):

Facebook Audience Network ads display

This is my build code for ads in feed :

separatorBuilder: (BuildContext context, int index){
            if (index != 0 && index % 3 == 0) {
              return Container(
                height: 300,
                child: Card(
                    color: white,
                    child: NativeAdmob(
                        controller: nativeAdController,
                        adUnitID: AdsHelper.bannerAdUnitId,
                        type: NativeAdmobType.full,
                        error: CupertinoActivityIndicator())
                ),
              );
            } else {
              return Container(height: 5, color: baseAccent);
            }
          },

My question is :

How can I customize the ads layout so that it fills available space and have a great display ?

Also, when I clic on ads nothing happen, maybe it is because this version is not yet released on AppStore and PlayStore ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For those who might have the same issue, I found an alternative solution.

The integration problem seems to come from flutter_native_admob package that is not really compatible with mediation with facebook apparently. So I replaced it by facebook_audience_network package and now it works fine.

I have no more mediation through Admob but at least I have facebook ads which was my point.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...