The Admob interstitial doesn't work in my Android app -
i copied code of interstitial here https://developers.google.com/mobile-ads-sdk/docs/admob/advanced doesnt' work. when app calls method interstitial.isloaded(), crashes. logcat:
04-06 14:40:09.320 29704-30638/? w/dalvikvm﹕ threadid=16: thread exiting uncaught exception (group=0x4145e438) 04-06 14:40:09.330 29704-30638/? e/androidruntime﹕ fatal exception: thread-3225 java.lang.illegalstateexception: isloaded must called on main ui thread. @ bkm.b(sourcefile:174) @ xx.e(sourcefile:210) @ yh.ontransact(sourcefile:66) @ android.os.binder.transact(binder.java:326) @ com.google.android.gms.internal.ac$a$a.isready(unknown source) @ com.google.android.gms.ads.interstitialad.isloaded(unknown source) @ com.myapp.gameactivity.displayinterstitial(gameactivity.java:75) @ com.myapp.gameactivity$gameview.ondraw(gameactivity.java:300) @ com.myapp.gameactivity$gameloop.run(gameactivity.java:524) 04-06 14:40:09.330 441-4437/? w/activitymanager﹕ force finishing activity...
how possible? can please explain me step-by-step have show interstitial? thank in advance
share case , solution
i call other thread , got error. solve using message sent other thread main thread (service/activity). make message handler in main thread call isloaded(). work.
Comments
Post a Comment