m1ga/ti.dfp

Cannot get it to work

danieltanti opened this issue · 2 comments

I'm trying to add the example you give in this module to my application, however I'm getting the following exception:

10-20 16:51:48.163: W/System.err(30568): java.lang.NullPointerException
10-20 16:51:48.163: W/System.err(30568): at ti.dfp.ViewProxy.requestAd(ViewProxy.java:37)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)
10-20 16:51:48.163: W/System.err(30568): at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:152)
10-20 16:51:48.163: W/System.err(30568): at android.os.Handler.handleCallback(Handler.java:733)
10-20 16:51:48.163: W/System.err(30568): at android.os.Handler.dispatchMessage(Handler.java:95)
10-20 16:51:48.163: W/System.err(30568): at android.os.Looper.loop(Looper.java:136)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)

Can you please guide me to a solution?

Thanks

I think I found the solution for this problem. For those that may encounter this problem in the future, please make sure you create a window or view large enough for the advert.

Thanks for the follow-up, @danieltanti. I'm going to close this ticket unless you think there's something I can do in the module code to handle this situation better.