Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Audience Network Ads integration Issue

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.

implementation 'com.facebook.android:audience-network-sdk:5.1.0'
implementation 'com.mopub.mediation:facebookaudiencenetwork:5.1.0.2'

am using FAN along with Mopub.

How to fix the above issue? Thanks in advance.

like image 490
Sarath Kumar Avatar asked Feb 14 '19 07:02

Sarath Kumar


People also ask

Is Facebook Audience Network shutting down?

Facebook decided to shut down its mobile web and in-stream placements because they want to focus their resources on mobile apps exclusively. A statement from them says: We've made this decision based on where we see growing demand from our partners, which is in other formats across mobile apps.

Should you use Facebook Audience Network?

The biggest perk of including Facebook Audience Network in your ad placements is that your ads will reach people who don't even have a Facebook account, so you'll attract a whole new crowd of people who are inaccessible to you via regular newsfeed ads.

How do I fix this app is already being monetized on Facebook Audience Network?

Solution: First delete the app and property from the given link in question. If you have deleted the app and property then Go to App Dashboard > Open App > Advance Setting > Reset Clint ID.


1 Answers

It's likely because you use custom Application subclass. Put AudienceNetworkAds.isInAdsProcess() call on top of your custom Application class like this:

public class YourApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        if (AudienceNetworkAds.isInAdsProcess(this)) {
            return;
        }

        // your normal onCreate() code
    }
}

Now warning should disappear.

Alternatively you can turn multiprocess support off (not recommended) by setting:

AdSettings.setMultiprocessSupportMode(MultiprocessSupportMode.MULTIPROCESS_SUPPORT_MODE_OFF);

Note. You should call this before calling SDK methods or MoPub mediation.

like image 78
Yuriy Avatar answered Sep 26 '22 15:09

Yuriy