Admob integration with pygame in android -


hello curious know solution integrating admob app written in pygame subset android. have tried below things did' t work me :(

still nothing working me may there no way :(

try 1: followed google https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals#android solution has no code change build.xml modification didt works me :(

try 2: tried below solutio also. http://www.michenux.net/android-admob-tutorial-461.html did't work me :(

try 3: tried hack pythonactivity.java. getting below related errors. have googleadmobadssdk-6.4.1.jar in \pgs4a-0.9.4\libs path still below kind of error.

below code:

  protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);     //vrbilgi          setcontentview(r_layout_main);     //    setcontentview(r.layout.main);              // create adview     //     adview = new adview(this, adsize.banner, my_ad_unit_id);             adview = new adview(this, adsize.banner,"a1520527530b444");              // lookup linearlayout assuming it's been given             // attribute android:id="@+id/mainlayout"           //  linearlayout layout = (linearlayout)findviewbyid(r.id.mainlayout);             linearlayout layout = (linearlayout)findviewbyid(r_adview);              // add adview             layout.addview(adview);              // initiate generic request load ad             adview.loadad(new adrequest());        //vrbilgi 

when launch app below error: please.

i/activitymanager(   66): starting activity: intent { act=android.intent.action.main cat=[android.intent.category.launcher] flg=0x10200000 cmp=com.number.game/org.renpy.android.pythonactivity } i/activitymanager(   66): start proc com.number.game:python activity com.number.game/org.renpy.android.pythonactivity: pid=1214 uid=10036 gids={1015, 3003} i/activitymanager(   66): starting activity: intent { act=android.intent.action.main cat=[android.intent.category.launcher] flg=0x10200000 cmp=com.number.game/org.renpy.android.pythonactivity } e/ads     ( 1214): android:configchanges value of com.google.ads.adactivity must include screenlayout. e/ads     ( 1214): android:configchanges value of com.google.ads.adactivity must include uimode. e/ads     ( 1214): android:configchanges value of com.google.ads.adactivity must include screensize. e/ads     ( 1214): android:configchanges value of com.google.ads.adactivity must include smallestscreensize. e/ads     ( 1214): must have adactivity declared in androidmanifest.xml configchanges. e/ads     ( 1214): must have adactivity declared in androidmanifest.xml configchanges. d/androidruntime( 1214): shutting down vm w/dalvikvm( 1214): threadid=1: thread exiting uncaught exception (group=0x4001d800) d/dalvikvm( 1214): gc_for_malloc freed 3598 objects / 323688 bytes in 110ms e/androidruntime( 1214): fatal exception: main e/androidruntime( 1214): java.lang.runtimeexception: unable start activity componentinfo{com.number.game/org.renpy.android.pythonactivity}: java.lang.classcastexception: com.google.ads.adview e/androidruntime( 1214):        @ android.app.activitythread.performlaunchactivity(activitythread.java:2663) e/androidruntime( 1214):        @ android.app.activitythread.handlelaunchactivity(activitythread.java:2679) e/androidruntime( 1214):        @ android.app.activitythread.access$2300(activitythread.java:125) e/androidruntime( 1214):        @ android.app.activitythread$h.handlemessage(activitythread.java:2033) e/androidruntime( 1214):        @ android.os.handler.dispatchmessage(handler.java:99) e/androidruntime( 1214):        @ android.os.looper.loop(looper.java:123) e/androidruntime( 1214):        @ android.app.activitythread.main(activitythread.java:4627) e/androidruntime( 1214):        @ java.lang.reflect.method.invokenative(native method) e/androidruntime( 1214):        @ java.lang.reflect.method.invoke(method.java:521) e/androidruntime( 1214):        @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:868) e/androidruntime( 1214):        @ com.android.internal.os.zygoteinit.main(zygoteinit.java:626) e/androidruntime( 1214):        @ dalvik.system.nativestart.main(native method) e/androidruntime( 1214): caused by: java.lang.classcastexception: com.google.ads.adview e/androidruntime( 1214):        @ org.renpy.android.pythonactivity.oncreate(pythonactivity.java:77) e/androidruntime( 1214):        @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1047) e/androidruntime( 1214):        @ android.app.activitythread.performlaunchactivity(activitythread.java:2627) e/androidruntime( 1214):        ... 11 more w/activitymanager(   66):   force finishing activity com.number.game/org.renpy.android.pythonactivity w/activitymanager(   66): activity pause timeout historyrecord{43fec778 com.number.game/org.renpy.android.pythonactivity} i/process ( 1214): sending signal. pid: 1214 sig: 9 w/inputmanagerservice(   66): window focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$proxy@44097098 i/activitymanager(   66): process com.number.game:python (pid 1214) has died. w/activitymanager(   66): activity destroy timeout historyrecord{43fec778 com.number.game/org.renpy.android.pythonactivity} 

this might you're looking for. know super late, future people might benefit this.

@override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);      androidapplicationconfiguration cfg = new androidapplicationconfiguration();     cfg.usegl20 = true;     cfg.useaccelerometer = false;     cfg.usecompass = false;      // create layout     relativelayout layout = new relativelayout(this);      // stuff initialize()     requestwindowfeature(window.feature_no_title);     getwindow().setflags(windowmanager.layoutparams.flag_fullscreen,                      windowmanager.layoutparams.flag_fullscreen);     getwindow().clearflags(windowmanager.layoutparams.flag_force_not_fullscreen);      // create pygame view     view gameview = initializeforview(r_layout_main, cfg);      // create , setup admob view     adview = new adview(this, adsize.banner, "your id here"); // put in secret key here     adview.loadad(new adrequest());      // add pygame view     layout.addview(gameview);      // add admob view     relativelayout.layoutparams adparams =              new relativelayout.layoutparams(relativelayout.layoutparams.wrap_content,                              relativelayout.layoutparams.wrap_content);     adparams.addrule(relativelayout.align_parent_top);     adparams.addrule(relativelayout.align_parent_right);      layout.addview(adview, adparams);      // hook     setcontentview(layout); } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -