Facebook Audience Network Ads integration Issue

女生的网名这么多〃 提交于 2019-12-08 19:23:30

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/54685140/facebook-audience-network-ads-integration-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!