I know this was requested many times, so today I gave another shot at AdMob plugin for Android and although it took me whole day, maybe this time it was successful.
Well at least you all ought to test it
Wanted to say thank you to @hgvyas123
for initial version, which unfortunately did not work on my android, but I took a lot from that plugin code and it really eased the understanding of how plugin works. Basically this plugin uses weak reference to activity, which I think also solves the problem for older Androids, so at least now it is working on mine Android 2.2 and Android 2.3 phones.
And introduced couple of additions as providing ad type, etc.
So here's the plugin itself, Android project with plugin code and Gideros example project, as well as installation and docs for usage:http://appcodingeasy.com/Gideros-Mobile/AdMob-plugin-for-Android
If you find anything wrong or not working, post here and will try to resolve it
nice work @ar2rsawseen !
thanks for this!
mGLView = new GiderosGLSurfaceView(this);
setContentView(R.layout.main); //R cannot be ?
FrameLayout layout = (FrameLayout)findViewById(R.id.layout_main); //R cannot be ?
The project is set to: Enable project specific settings > Compiler 1.6 - default
Imported this and the error still there;
import android.R.layout; - thanks
With clean project and com.domain.app I managed to export the apk, so i got this error:
App start > show Gideros splash > close
1 - Added the lua code on main.lua
admob.loadAd('App Publisher iD OK')
2 - com.google.ads.AdActivity on manifest.xml
3 - "You can simply copy contents of AdMobPlugin folder into your project folder"
4 - Then import needed packages
5 - ...
I was trying to see some information on logcat, but it shows millions of things i do not understand;
Or you can share your project here
Create a zip of the project and send direct to you ? No problem
You want the project ?
Only thing I needed to do was basically to re-reference GoogleAdMobAdsSdk-6.1.0.jar lirbary, because I did not have it in your referenced location.
So how did you add the GoogleAdMobAdsSdk-6.1.0.jar to the project?
My recommended way is to right click on Referenced Libraries. Then choose Build Path -> Configure Build Path. In the Libraries tab click Add Jar and navigate to your project folder and add the GoogleAdMobAdsSdk-6.1.0.jar file. Then go to Order and export and check GoogleAdMobAdsSdk-6.1.0 there.
Maybe you missed that last step?
i will have an answer in the morning. Many thanks to spend time solving this
Tested with Android 4.0.3 and 4.1.2 with admob 6.1.0 / 6.2.1
Maybe I'm still not getting something right, unfortunately I can only test on Android's 2.2 and 2.3
But I can not see source code for libadmob.so Did you add this project as another repo on github? If not, are you planning to publish this project with nice how to page?
In this article in download section http://appcodingeasy.com/Gideros-Mobile/AdMob-plugin-for-Android#download you can download standalone plugin, example project and android project with plugin source. The source for SO is in jni folder
I try export your Admob Gideros example to Java project then do as your tutorial but when I run from VM it suddenly closed without any error message.
this is what i get from Log Cat:
Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 644 (Thread-72)
thank you very much
Ultimate Games on Appstore
Ultimate Games on Google Play
@ar2rsawseen If you need to test this on Android 4.2, I can help. Is there anything I can do to help you to identify the problem?