0

cant show fulscreen ads, just links, banners and popups. My code:

revmob = RevMob.start(ac);
    link = revmob.createAdLink(ac, listener);
    fullscreen = revmob.createFullscreen(ac, listener);

where ac is the main activity, and listener is a listener initialized in the following way:

listener = new RevMobAdsListener() {
        public void onRevMobAdReceived() {}
        public void onRevMobAdNotReceived(String message) {}
        public void onRevMobAdDisplayed(){}
        public void onRevMobAdDismiss() {}
        public void onRevMobAdClicked() {}
    };

Error Logcat:

04-20 22:55:24.326: D/[RevMob](27728): Unexpected error on create Fullscreen Ad.
04-20 22:55:24.326: D/[RevMob](27728): java.lang.NullPointerException
04-20 22:55:24.326: D/[RevMob](27728):  at com.revmob.ads.fullscreen.FullscreenActivity.initFullscreen(FullscreenActivity.java:158)
04-20 22:55:24.326: D/[RevMob](27728):  at com.revmob.ads.fullscreen.FullscreenActivity.onCreate(FullscreenActivity.java:105)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.Activity.performCreate(Activity.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.ActivityThread.access$600(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.os.Handler.dispatchMessage(Handler.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.os.Looper.loop(Looper.java)
04-20 22:55:24.326: D/[RevMob](27728):  at android.app.ActivityThread.main(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728):  at java.lang.reflect.Method.invokeNative(Native Method)
04-20 22:55:24.326: D/[RevMob](27728):  at java.lang.reflect.Method.invoke(Method.java)
04-20 22:55:24.326: D/[RevMob](27728):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
04-20 22:55:24.326: D/[RevMob](27728):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
04-20 22:55:24.326: D/[RevMob](27728):  at dalvik.system.NativeStart.main(Native Method)

The error comes and crashs the app if the following code is executed: fullscreen.show();

user3221178
  • 41
  • 1
  • 3
  • 1
    Well, something is `null` at FullscreenActivity.java:158... Could you show that line? (If it is not part of a library, but an own class...) – ppeterka Apr 20 '14 at 21:08
  • 1
    Fullscreenactivity.java is a class of the revmob library, its not mine... The error comes if the following code will be executed: fullscreen.show(); – user3221178 Apr 20 '14 at 21:24
  • Do you try to display the fullscreen ad while the activity is still visible? – Dalmas Apr 20 '14 at 21:28
  • I dont know what you really mean with visible, but the app is running the whole time in the foreground. – user3221178 Apr 20 '14 at 21:59
  • Does really no one know how to solve this problem? On my other apps, there all ads are working well, also the fullscreen one. They both have almost the same manifest and java code. – user3221178 Apr 21 '14 at 10:57
  • don't you forget to add ` ` to the AndroidManifest.xml? – naXa stands with Ukraine May 21 '14 at 10:31

0 Answers0