如何使用facebook广告网络展示插页式广告?

时间:2018-04-19 04:42:23

标签: android facebook-android-sdk facebook-ads-api interstitial

我必须使用Android Platfrom开发自定义广告网络。当我实施FAN(Facebook)广告网络时 插页式广告未显示。当我运行我的应用程序应用空白活动。我得到了他的下面的日志错误。 横幅广告正常运作。

04-19 09:52:42.395 4620-4620/com.example.djaxtech.newdjaxdemoapp I/SensorManagerFlow: registerListenerImpl
java.lang.Exception
at android.hardware.SystemSensorManager.registerListenerImpl(SystemSensorManager.java:118)
at android.hardware.SensorManager.registerListener(SensorManager.java:775)
at android.hardware.SensorManager.registerListener(SensorManager.java:682)
at com.facebook.ads.internal.g.a.a(Unknown Source)
at com.facebook.ads.internal.i.c.b(Unknown Source)
at com.facebook.ads.internal.o.b.<init>(Unknown Source)
at com.facebook.ads.internal.DisplayAdController.c(Unknown Source)
at com.facebook.ads.internal.DisplayAdController.a(Unknown Source)
at com.facebook.ads.InterstitialAd.a(Unknown Source)
at com.facebook.ads.InterstitialAd.loadAd(Unknown Source)
at com.facebook.ads.InterstitialAd.loadAd(Unknown Source)
at com.adserversdk.dj.sdk.mediation.adapder.FacebookInterstitial.loadInterstitial(FacebookInterstitial.java:62)
at com.adserversdk.dj.sdk.adserver.AdView.displayFacebookAd(AdView.java:986)
at com.adserversdk.dj.sdk.adserver.AdFetcher$RequestHandler.handlingResponse(AdFetcher.java:266)
at com.adserversdk.dj.sdk.adserver.AdFetcher$RequestHandler.handleMessage(AdFetcher.java:216)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5596)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

mycode的:

/**
    * CustomEventInterstitial implementation
    */

   @Override
   public void loadInterstitial(Context context, CustomEventInterstitialListener customEventInterstitialListener,
                                Map<String, String> serverExtras) {
       mInterstitialListener = customEventInterstitialListener;

       final String placementId;
       placementId = serverExtras.get(PLACEMENT_ID_KEY);
       AdSettings.addTestDevice("83eb6909-e93c-4dc8-8a24-f69fdddfcb0b");
       mFacebookInterstitial = new InterstitialAd(context, placementId);
       mFacebookInterstitial.setAdListener(this);
       mFacebookInterstitial.loadAd();  //error is here
   }

错误指向此行“mFacebookInterstitial.loadAd();”

如何修复此错误,在此先感谢。

0 个答案:

没有答案