Background
I had this on the project, to handle Facebook ads via Admob:
implementation 'com.google.ads.mediation:facebook:6.11.0.0'
And in code:
final AdRequest.Builder builder = new AdRequest.Builder();
builder.addNetworkExtrasBundle(FacebookAdapter.class, new FacebookExtras().setNativeBanner(true).build());
adLoader.loadAd(builder.build());
It works fine.
The problem
Now when updating to the new version (originally I asked about 6.12.0) :
implementation 'com.google.ads.mediation:facebook:6.14.0'
It shows that both FacebookAdapter and FacebookExtras don't exist anymore.
What I've tried
Checking on the docs, even though they say to use this version, the code they tell to use is the same as before:
- https://developers.google.com/admob/android/mediation/meta#step_3_import_the_meta_audience_network_sdk_and_adapter
- https://developers.google.com/ad-manager/mobile-ads-sdk/android/mediation/meta#using_meta_audience_network_native_ads_without_a_mediaview
Bundle extras = new FacebookExtras()
.setNativeBanner(true)
.build();
AdManagerAdRequest request = new AdManagerAdRequest.Builder()
.addNetworkExtrasBundle(FacebookAdapter.class, extras)
.build();
EDIT: someone wrote that I should use this, but without any explanation of where he got this from, and I also failed to find the origin of it:
I tried to ask some questions about it, but then it got removed.
EDIT: It seems that the old instructions are now completely gone.
So perhaps it's not needed anymore:
Then again, they still mention there the class that doesn't exist anymore : FacebookAdapter .
I tried to just update the dependency and remove the code that can't be used, but then I got this error while loading the native ad:
error code 3 - Unable to instantiate mediation adapter class.
The question
What should I use instead? How come it's not documented?