- Home /
including unity ads Kivy app
Hi,
I have written a Python-for-android Kivy app and I am using pyjnius to integrate the unity SDK in my app. So far, I have updated AndroidManifest.xml to include both AdUnitActivity and AdUnitSoftwareActivity activities. I couldn't find classes.jar in the latest unity releases on github. I only found in version 3 or before. I included it in my libs dir which is referred to in buildozer, which I have updated accordingly. My first question, where can I find the classes.jar file for more recent versions of unity ads?
I am also having issues with the Pyjnius code.
I have no trouble importing the classes, for example:
PythonActivity = autoclass("org.kivy.android.PythonActivity")
unity_ads_listener = autoclass("com.unity3d.ads.IUnityAdsListener")
unity_ads = autoclass("com.unity3d.ads.UnityAds")
Later when I try to initialise the ads listener, adb log returns an error.
unity_ads.addListener(unity_ads_listener)
unity_ads.initialize(self,app_id,testmode)
The error:
I python : AttributeError: type object 'com.unity3d.ads.UnityAds' has no attribute 'addListener'
What am I doing wrong here?
Your answer
Follow this Question
Related Questions
Integrating unity ads in Python Kivy 0 Answers
Failed to update Android SDK Package List - Unity 2019.2.10f1 10 Answers
erorr in building scene ????? 0 Answers
Getting this error when trying to run a game on android 2 Answers
How do I solve CommandInvokeFailure? 2 Answers