Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kivy and Google Play services

I'm trying one approach of implementing ads into Kivy app using this example

I have no idea if its going to work. I downloaded Google Play services in SDK, but I have no clue where I have to stick it into, I tried many places, but unsuccessfully, always get

error: package com.google.android.gms.ads.AdView does not exist

and other packages as well. I apologize for my ignorance of android sdk, but I'm trying to understand it better, so I need some help. I need to know where I have to put 'google-play-services_lib' so it would find it. Thanks!

EDIT: solved it, adding this to 'buildozer.spec':

# (list) Android library project to add (will be added in the
# project.properties automatically.)
android.library_references = libs/google-play-services_lib

but still get an error:

.../android-sdk-21/tools/ant/build.xml:539: Unable to resolve project target 'android-9'

here is this line:

    <gettarget
            androidJarFileOut="project.target.android.jar"
            androidAidlFileOut="project.target.framework.aidl"
            bootClassPathOut="project.target.class.path"
            targetApiOut="project.target.apilevel"
            minSdkVersionOut="project.minSdkVersion" /> # line 539!!!
like image 467
1bit0fMe Avatar asked Mar 28 '14 19:03

1bit0fMe


People also ask

How do I deploy my Kivy app on Google Play?

Packaging your application for the Kivy Launcher¶Go on Google Play Store and search for Kivy Launcher from kivy org. Click on Install. Select your phone… And you're done!

Is Kivy good for Android?

If you're a Python developer thinking about getting started with mobile development, then the Kivy framework is your best bet. With Kivy, you can develop platform-independent applications that compile for iOS, Android, Windows, MacOS, and Linux.

Can I use Kivy with Android studio?

The widgets added in Kivy could be handled within Android Studio. Moreover, Android views could be added to enrich the Kivy application. The resulting Android application created with Kivy can be hosted on Google Play to download and install as a regular Android application.

Is Kivy efficient?

Kivy is very fast and efficient for a lot of things - in terms of basic graphics operations you can easily push and manipulate thousands of vertices with complex effects at no perceptible slowdown.


1 Answers

And that solved as well, sorry for the mess I've made here, asking and answering my own questions, but I think it's an important topic for Kivy users, and there's not much about this on the net. So, solution: I manually set project 'target' to 'android-14' in 'ant.properties' file inside 'google-play-services_lib'. It was throwing error because the google play services library was for newer android api.

Anyway, for anyone curious if that worked (implementing ads into Kivy app for Android), YES it worked, I had to rewrite the original solution to support new library though (using this guide)

like image 133
1bit0fMe Avatar answered Sep 29 '22 11:09

1bit0fMe