Android Question Admob facebook mediation question

tufanv

Expert
Licensed User
Longtime User
Hello,

I added the necessary aar files for facebook audience network and edited the mediation in admob for facebook. My problem is after the ad is received I get the following error:

com.google.android.gms.ads.mediation.OnImmersiveModeUpdatedListener #009 Class mismatch: com.google.ads.mediation.facebook.FacebookAdapter
START u0 {flg=0x10000000 cmp=ct.canlidoviz/com.facebook.ads.AudienceNetworkActivity (has extras)} from uid 10070
Can't start AudienceNetworkActivity. Make sure that it's in your AndroidManifest.xml file.

I have this in my manifest :

B4X:
'facebook
CreateResource(values, strings.xml, <resources>
     <string name="facebook_app_id">4315.....</string>
    </resources>)
AddApplicationText(<activity android:name="com.facebook.FacebookActivity"
          android:configChanges=
                 "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
          android:theme="@android:style/Theme.Translucent.NoTitleBar" />
           <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>)

AddApplicationText(application
android:label="Canli"
/>
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> )
  
AddApplicationText(
<activity android:name="com.facebook.ads.InterstitialAdActivity"
           android:configChanges="keyboardHidden|orientation" />
)
'facebook end
'End of default text.

I have copied this code from my previous tutorial which was working but it is obvious that this is not correct anymore. What must be the manifest entry for this facebook audience network ? In facebook's tutorial, it says no additional code required like the mopub tutorial but a manifest entry was needed in mopub so it msut also be needed in this one.
 

tufanv

Expert
Licensed User
Longtime User
Hello,

I added the necessary aar files for facebook audience network and edited the mediation in admob for facebook. My problem is after the ad is received I get the following error:



I have this in my manifest :

B4X:
'facebook
CreateResource(values, strings.xml, <resources>
     <string name="facebook_app_id">4315.....</string>
    </resources>)
AddApplicationText(<activity android:name="com.facebook.FacebookActivity"
          android:configChanges=
                 "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
          android:theme="@android:style/Theme.Translucent.NoTitleBar" />
           <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>)

AddApplicationText(application
android:label="Canli"
/>
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> )
 
AddApplicationText(
<activity android:name="com.facebook.ads.InterstitialAdActivity"
           android:configChanges="keyboardHidden|orientation" />
)
'facebook end
'End of default text.

I have copied this code from my previous tutorial which was working but it is obvious that this is not correct anymore. What must be the manifest entry for this facebook audience network ? In facebook's tutorial, it says no additional code required like the mopub tutorial but a manifest entry was needed in mopub so it msut also be needed in this one.

Adding this fixed the issue:

no more entry is needed. but I only see test ads with this, maybe another entry is required. anyone knows what may be the problem ?

B4X:
'facebook
AddApplicationText(
<activity android:name="com.facebook.ads.AudienceNetworkActivity" android:configChanges="keyboardHidden|orientation|screenSize" />)
'End of default text.
 
Last edited:
Upvote 0

tufanv

Expert
Licensed User
Longtime User
The default behaviour in genymotion devices is to show test ads, real devices show real ads. Thanks
 
Upvote 0
Top