Facebook Audience Network Ads integration Issue Facebook Audience Network Ads integration Issue android android

Facebook Audience Network Ads integration Issue


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.


If you are using Facebook Audience Network then, Must be implement both latest sdk in your dependencies then you can call all callback of facebook sdk( check this link- https://developers.facebook.com/docs/audience-network/guides/adding-sdk/android )

Here you forget to add (support annotation dependencies).

In Android Studio, make sure that mavenCentral() or jcenter() is included in your project's list of repositories. Repositories are defined in your project's module-level build.gradle file.

repositories {    mavenCentral()    jcenter()}

Next, add the following implementation dependencies to your project's list of dependencies. Dependencies are also defined in your project's module-level build.gradle file. Note that annotation support is required by the Audience Network SDK.

dependencies {     implementation 'com.android.support:support-annotations:28.0.0'    implementation 'com.facebook.android:audience-network-sdk:5.+'}

HAPPY CODING :)