Facebook Audience Network Mediation through Admob

1,460 views
Skip to first unread message

Vjy Anand

unread,
May 16, 2018, 5:10:30 AM5/16/18
to Google Mobile Ads SDK Developers
I am trying to mediate FAN native Ads through Admob Mediation. I have added necessary gradle entries for FAN

implementation 'com.facebook.android:audience-network-sdk:4.28.1'
implementation 'com.google.ads.mediation:facebook:4.28.1.0'


I see FAN ads being displayed. However, I don't see clicks registered (not launching Ads page) for Native Ads when FAN ads are displayed. I have tested with both test and live Ads. Thanks for your help.


Vjy Anand

unread,
May 16, 2018, 5:13:32 AM5/16/18
to Google Mobile Ads SDK Developers
Below is code snipped which I missed in my previous post. 
 
private void populateUnifiedNativeAdView(UnifiedNativeAd nativeAd, UnifiedNativeAdView adView) {
adView.setHeadlineView(adView.findViewById(R.id.ad_headline));
adView.setBodyView(adView.findViewById(R.id.ad_body));
adView.setCallToActionView(adView.findViewById(R.id.ad_call_to_action));
adView.setIconView(adView.findViewById(R.id.ad_app_icon));
adView.setStarRatingView(adView.findViewById(R.id.ad_stars));
adView.setAdvertiserView(adView.findViewById(R.id.ad_advertiser));

// Some assets are guaranteed to be in every UnifiedNativeAd.
((TextView) adView.getHeadlineView()).setText(nativeAd.getHeadline());
((TextView) adView.getBodyView()).setText(nativeAd.getBody());
((Button) adView.getCallToActionView()).setText(nativeAd.getCallToAction());

// These assets aren't guaranteed to be in every UnifiedNativeAd, so it's important to
// check before trying to display them.
if (nativeAd.getIcon() == null) {
adView.getIconView().setVisibility(View.GONE);
} else {
((ImageView) adView.getIconView()).setImageDrawable(
nativeAd.getIcon().getDrawable());
adView.getIconView().setVisibility(View.VISIBLE);
}

if (nativeAd.getStarRating() == null) {
adView.getStarRatingView().setVisibility(View.INVISIBLE);
} else {
((RatingBar) adView.getStarRatingView())
.setRating(nativeAd.getStarRating().floatValue());
adView.getStarRatingView().setVisibility(View.VISIBLE);
}

if (nativeAd.getAdvertiser() == null) {
adView.getAdvertiserView().setVisibility(View.INVISIBLE);
} else {
((TextView) adView.getAdvertiserView()).setText(nativeAd.getAdvertiser());
adView.getAdvertiserView().setVisibility(View.VISIBLE);
}
adView.setNativeAd(nativeAd);
}

private void refreshAd() {
AdLoader.Builder builder = new AdLoader.Builder(this, getString(R.string.native_ad_unit_id));
builder.forUnifiedNativeAd(new UnifiedNativeAd.OnUnifiedNativeAdLoadedListener() {

@Override
public void onUnifiedNativeAdLoaded(UnifiedNativeAd unifiedNativeAd) {
FrameLayout frameLayout = findViewById(R.id.ad_placeholder);
frameLayout.setVisibility(View.VISIBLE);
UnifiedNativeAdView adView = (UnifiedNativeAdView) getLayoutInflater().inflate(R.layout.ad_unified, null);
populateUnifiedNativeAdView(unifiedNativeAd, adView);
frameLayout.removeAllViews();
frameLayout.addView(adView);
}
});

VideoOptions videoOptions = new VideoOptions.Builder().setStartMuted(true).build();
NativeAdOptions adOptions = new NativeAdOptions.Builder().setVideoOptions(videoOptions).setAdChoicesPlacement(ADCHOICES_BOTTOM_RIGHT).build();
builder.withNativeAdOptions(adOptions);
AdLoader adLoader = builder.withAdListener(new AdListener() {
@Override
public void onAdFailedToLoad(int errorCode) {
FrameLayout frameLayout = findViewById(R.id.ad_placeholder);
frameLayout.setVisibility(View.GONE);
Log.w(Util.APP_TAG, "Failed to load native ad: " + errorCode);
}

@Override
public void onAdLoaded() {
super.onAdLoaded();
FrameLayout frameLayout = findViewById(R.id.ad_placeholder);
frameLayout.setVisibility(View.VISIBLE);
}

}).build();
adLoader.loadAd(new AdRequest.Builder().build());
}

 

mobileadssdk-a...@google.com

unread,
May 16, 2018, 3:28:36 PM5/16/18
to Vjy Anand, Google Mobile Ads SDK Developers
Hi Anand,

Thanks for reaching out to us. I don't notice any issues with your integration. However, can you test with our sample apps and let us know if you are still able to reproduce this issue? If so, do send us Charles logs, device logs and we will have a look into this issue.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/10d9326b-415c-4dcc-9e2a-8594cf888014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vjy Anand

unread,
May 17, 2018, 8:21:57 AM5/17/18
to Google Mobile Ads SDK Developers
Hi Deepika,

I tried the sample code, it doesn't work for FAN network. Ads get displayed, but when I click on Test Ads, it doesn't pop up Ads page (only for FAN).

Thanks
- Vijay

mobileadssdk-a...@google.com

unread,
May 17, 2018, 3:28:00 PM5/17/18
to Vjy Anand, Google Mobile Ads SDK Developers
Hi Anand,

Thanks for sending the Sample app. I'm unable to receive any ads from FAN but was able to load test ads and saw that the click through was working properly without any issues with the sample app that you have provided and with our sample app as well. If this is happening only with FAN ads, could you please send us an Ad Unit ID that reliably mediate ads from FAN and we will investigate this further. 

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Vjy Anand

unread,
May 17, 2018, 8:12:51 PM5/17/18
to mobileadssdk-a...@google.com, Google Mobile Ads SDK Developers
I see this error in log

05-18 05:39:33.851 8665 8665 W FacebookAdapter: Failed to register
view for interaction.
- Vijay
> email to google-admob-ads...@googlegroups.com.
> To post to this group, send email to google-adm...@googlegroups.com.
Screen Shot 2018-05-18 at 5.40.46 AM.png

Vjy Anand

unread,
May 17, 2018, 8:23:14 PM5/17/18
to Google Mobile Ads SDK Developers
if (view instanceof UnifiedNativeAdView) {
    UnifiedNativeAdView appInstallAdView = (UnifiedNativeAdView) view;

https://github.com/googleads/googleads-mobile-android-mediation/blob/master/ThirdPartyAdapters/facebook/facebook/src/main/java/com/google/ads/mediation/facebook/FacebookAdapter.java#L909

NativeAppInstallAdView Should be as above UnifiedNativeAdView

mobileadssdk-a...@google.com

unread,
May 18, 2018, 3:18:44 PM5/18/18
to Vjy Anand, Google Mobile Ads SDK Developers
Hi Anand,

The Facebook adapter does not yet support UnifiedNativeAd and you would have to load Ad type that you require individually. I don't have an ETA as to when UnifiedNativeAd will supported by the FAN Adapter but you can monitor this via the release notes from the adapter.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/2274e957-35e6-4552-b219-e5f88472dec8%40googlegroups.com.

Vjy Anand

unread,
May 30, 2018, 6:19:45 AM5/30/18
to Google Mobile Ads SDK Developers
Thanks

Thanks 

mobileadssdk-a...@google.com

unread,
Jun 1, 2018, 12:50:18 PM6/1/18
to Vjy Anand, Google Mobile Ads SDK Developers
Hi Vijay,

The issue has been fixed and Facebook Android Adapter version 4.28.1.1 is live.  Let us know if you are still seeing any issues.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 05/30/18 06:19:45 vi...@iavian.com wrote:
Thanks

Thanks 

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Ritu Raj

unread,
Jan 3, 2019, 5:54:47 AM1/3/19
to Google Mobile Ads SDK Developers
It seems like this issue has not been resolved yet. I am using the following dependancies 

implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.facebook.android:audience-network-sdk:5.1.0'
implementation 'com.google.ads.mediation:facebook:5.1.0.0'

The same issue is still present in UnifiedNativeAd, however.

mobileadssdk-a...@google.com

unread,
Jan 3, 2019, 3:47:55 PM1/3/19
to Ritu Raj, Google Mobile Ads SDK Developers
Hello there,

Can you please share a sample project if you are able to reproduce the issue with the latest version of the adapter and SDK? You can use "Reply Privately to Auythor" option to share the sample app privately.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 01/03/19 05:54:46 ritur...@gmail.com wrote:
It seems like this issue has not been resolved yet. I am using the following dependancies 

implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.facebook.android:audience-network-sdk:5.1.0'
implementation 'com.google.ads.mediation:facebook:5.1.0.0'

The same issue is still present in UnifiedNativeAd, however.

On Friday, June 1, 2018 at 10:20:18 PM UTC+5:30, mobileadssdk-a...@google.com wrote:
Hi Vijay,

The issue has been fixed and Facebook Android Adapter version 4.28.1.1 is live.  Let us know if you are still seeing any issues.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 05/30/18 06:19:45 vi...@iavian.com wrote:
Thanks

Thanks 

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

mobileadssdk-a...@google.com

unread,
Jan 4, 2019, 4:02:39 PM1/4/19
to Ritu Raj, Google Mobile Ads SDK Developers
Hello there,

Thanks for sharing additional information privately. I don't see any issues with your implementation. Can you retry with our sample apps if you are still noticing this? Or share your Ad Unit ID with us for us to have a look?

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Vjy Anand

unread,
Jan 30, 2019, 8:18:56 PM1/30/19
to google-adm...@googlegroups.com

The issue still persists

E FBAudienceNetwork: You are using custom Application class and don't call AudienceNetworkAds.isInAdsProcess(). Multi-process support will be disabled. Please call AudienceNetworkAds.isInAdsProcess() if you want to support multi-process mode.


mobileadssdk...@google.com

unread,
Jan 31, 2019, 3:43:07 PM1/31/19
to Vjy Anand, Google Mobile Ads SDK Developers
Hello Vijay,

Are you seeing this with the latest version of the SDK of both AdMob and FAN? Have your tried with the sample apps and was able to reproduce the issue? If yes, can you please share a sample project for us take a look? You can use "Reply Privately to Author" to share the details privately.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 01/30/19 20:18:56 vi...@iavian.com wrote:
The issue still persists

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Sarath Kumar

unread,
Feb 14, 2019, 2:33:25 AM2/14/19
to google-adm...@googlegroups.com
Does the issue is resolved?

mobileadssdk...@google.com

unread,
Feb 14, 2019, 4:08:19 PM2/14/19
to Sarath Kumar, Google Mobile Ads SDK Developers
Hello Sarath,

Issue has been resolved. But as you can see from recent posts on this thread, few users have reached out to us saying that they are still seeing the issue and we are waiting for the details from them to share it with the team. If you are able to reproduce the issue with the latest verison of the SDK of both AdMob and FAN, please share a sample project so that we can test it on our end and share this with the rest of the team for further investigation.

Regards,
Deepika Uragyala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 02/14/19 02:33:25 sarath....@gmail.com wrote:
Does the issue id resolved?


On Thursday, January 31, 2019 at 6:48:56 AM UTC+5:30, Vjy Anand wrote:

The issue still persists

E FBAudienceNetwork: You are using custom Application class and don't call AudienceNetworkAds.isInAdsProcess(). Multi-process support will be disabled. Please call AudienceNetworkAds.isInAdsProcess() if you want to support multi-process mode.


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Karlos Olivares

unread,
Apr 3, 2019, 7:27:08 AM4/3/19
to Google Mobile Ads SDK Developers

Vjy Anand

unread,
Apr 3, 2019, 7:28:50 AM4/3/19
to Karlos Olivares, Google Mobile Ads SDK Developers
Need to have mediaview in the layout. 

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/aU_vtlma-D8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/9d277bc2-8d42-43d6-9e08-4b02878d869f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Vijay

Karlos Olivares

unread,
Apr 3, 2019, 7:49:50 AM4/3/19
to Google Mobile Ads SDK Developers

Karlos Olivares

unread,
Apr 4, 2019, 3:22:58 AM4/4/19
to Google Mobile Ads SDK Developers
Reply all
Reply to author
Forward
0 new messages