Git Product home page Git Product logo

admob4kivy's Introduction

##ABOUT: this piece of code is a proof of concept for the integration of admob in a Kivy project. it used to work fairly well with the old toolchain of python-for-android, as well as on iOS8+.

##ANDROID:

  1. Open the Android SDK Manager and download "Google Repository" and "Google Play services" which are in the Extras category.

  2. Copy the google-play-services_lib folder from ANDROIDSDK/extras/google/google_play_services/libproject to your app folder (where you keep your main.py)

  3. Edit your buildozer.spec and add

android.meta_data = com.google.android.gms.version=@integer/google_play_services_version
android.library_references = google-play-services_lib
  1. Update your android project to take google play services into account:
$ android update project --subprojects -t 1 -p ./google-play-services_lib/
  1. Add an activity to the Androidmanifest.tmpl.xml to handle the ads:
<activity android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" 
            android:process=":python"
/>
  1. Update your settings.py with your admob unitID and devices hashes
$ cp settings.py.sample settings.py && vim settings.py
  1. Build your android app
$ buildozer android debug

=> DONE

##IOS:

  1. create kivy-ios project

  2. follow https://developers.google.com/admob/ios/quick-start#manually_using_the_sdk_download to add the mandatory frameworks.

  3. run on a testing device.

##Important notes:

  • Don't mess with Google by cliquing on your own ads to generate traffic, you will be catched, and then banned from the service.

admob4kivy's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.