Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KivMob Tutorial Requests #44

Closed
pretentious7 opened this issue Jul 4, 2019 · 11 comments
Closed

KivMob Tutorial Requests #44

pretentious7 opened this issue Jul 4, 2019 · 11 comments

Comments

@pretentious7
Copy link

pretentious7 commented Jul 4, 2019

I'm sorry for being dumb, but I can't figure it out and I can't find docs.

Right now, I want to get a simple banner ad running.

class ScatterTextWidget(BoxLayout):
    APPID = 'ca-app-pub-NUMBER'
    BANNERID = 'ca-app-pub-ADNUMBER'
    ads = KivMob(APPID)
    ads.new_banner(BANNERID)
    ads.show_banner()
    ads.request_banner()
    
    pass

class DiceRollerApp(App):
    def build(self):
        return ScatterTextWidget()

if __name__ == "__main__":
    DiceRollerApp().run()

I've got an attendant .kv file for the app functionality and UI. Is this correct?

@MichaelStott
Copy link
Owner

MichaelStott commented Jul 4, 2019

I need to finish and post the sphinx documentation for this. Hopefully will have some free time in the near future to wrap that up. (#21)

As far as your code goes, you should request the banner ad before calling show (request_banner before show_banner).

@MichaelStott MichaelStott changed the title How do I run the demo and learn to use KivMob? KivMob Tutorial Requests Jul 4, 2019
@MichaelStott MichaelStott self-assigned this Jul 4, 2019
@pretentious7
Copy link
Author

do I have to put he publisher ID anywhere?

@MichaelStott
Copy link
Owner

MichaelStott commented Jul 4, 2019

No, just the app and banner ids. You'll also have to include the app id in the buildozer.spec file:

android.meta_data = com.google.android.gms.ads.APPLICATION_ID=ca-app-pub-####

@pretentious7
Copy link
Author

pretentious7 commented Jul 5, 2019

the ad is still not showing, here's the logcat, admob says I'm ready to serve ads, so idk what's going on.

6 01:28:57.951 18199 18253 I python : [INFO ] [Factory ] 184 symbols loaded
07-06 01:28:58.561 18199 18253 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
07-06 01:28:58.630 18199 18253 I python : [INFO ] [Text ] Provider: sdl2
07-06 01:29:00.309 18199 18253 I python : [INFO ] [KivMob ] init called.
07-06 01:29:00.310 18199 18253 I python : [INFO ] [KivMob ] Android platform detected.
07-06 01:29:00.355 18199 18253 I python : [INFO ] [KivMob ] new_banner() called.
07-06 01:29:00.364 18199 18253 I python : [INFO ] [KivMob ] request_banner() called.
07-06 01:29:00.368 18199 18253 I python : [INFO ] [KivMob ] show_banner() called.
07-06 01:29:00.486 18199 18253 I python : [INFO ] [Window ] Provider: sdl2
07-06 01:29:00.537 18199 18253 I python : [INFO ] [GL ] Using the "OpenGL ES 2" graphics system
07-06 01:29:00.540 18199 18253 I python : [INFO ] [GL ] Backend used
07-06 01:29:00.541 18199 18253 I python : [INFO ] [GL ] OpenGL version <b'OpenGL ES 3.2 v1.r20p0-01rel0.9a7fca3f7dd712a473937294a8ae24b1'>
07-06 01:29:00.542 18199 18253 I python : [INFO ] [GL ] OpenGL vendor <b'ARM'>
07-06 01:29:00.543 18199 18253 I python : [INFO ] [GL ] OpenGL renderer <b'Mali-T830'>
07-06 01:29:00.544 18199 18253 I python : [INFO ] [GL ] OpenGL parsed version: 3,

@pretentious7
Copy link
Author

@pretentious7
Copy link
Author

pretentious7 commented Jul 5, 2019

I notice that it says something about firebase and having to add a test device, and that the ad failed to load. What should I do about that exactly?

also should i make a new thread for this?

@MichaelStott
Copy link
Owner

MichaelStott commented Jul 6, 2019

This thread is fine. Your ad failed to load with error code 3, this means that the ad request was correct, but the there was a lack of ad inventory. I find this sometimes occurs after creating new app and ad ids. Wait about a couple hours to a day and then try again.

@pretentious7
Copy link
Author

pretentious7 commented Jul 6, 2019

Ah ok. Yep I tested with the test banner and that worked. Thank you!

How can I move the ad to the bottom of the screen?

@MichaelStott
Copy link
Owner

MichaelStott commented Jul 6, 2019

Just create the banner ad like this:

ads.new_banner("BANNER-AD-ID", False)

@MichaelStott
Copy link
Owner

First draft of tutorials now included in the docs: http://kivmob.com

@Ayhancelik
Copy link

Hi Michael First of all, thank you.
I have prepared and published an application called Password Builder.
He's testing it right now. Even though I put my own number in the code.
Should I wait for a while or is there something wrong?

self.ads = KivMob(TestIds.APP)
self.ads.new_banner(TestIds.BANNER, top_pos= False)
self.ads.request_banner()
self.ads.show_banner()
Do I need a change in code?

As your tutorials like
I Have added my application id to the spec file .
https://play.google.com/store/apps/details?id=com.passwordbuilder.passwordbuilder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants