Hi Gideros,
I have messaged many people about how to integrate ad interface to android. But i did not get reply from any. It is really needed for me very urgent. I am not at all getting how to do that. Please can you send a example project with Gideros simple project and Eclipse Project full set up with ad interface. So that i can refer that and can do my project setup. Because i downloaded the Ads plugin but the steps they mentioned i am not able to understand. Please anyone do this help for me.
Thanks,
Dorado Lab
Comments
Other choice is via plugin interface which is open to everyone. But of course coding is needed.
Here is Admob plugin for example :
http://appcodingeasy.com/Gideros-Mobile/AdMob-plugin-for-Android
And here is the ads interface:
http://docs.giderosmobile.com/interface/ads
Please do help me with a example project.
Thanks,
Dorado Lab
Thanks,
Dorado Lab
Error code :
07-01 03:26:19.744: E/AndroidRuntime(16386): FATAL EXCEPTION: main
07-01 03:26:19.744: E/AndroidRuntime(16386): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1652): could not load library "liblua.so" needed by "libads.so"; caused by load_library(linker.cpp:759): library "liblua.so" not found
Thanks,
Dorado Lab
1) Take your app and do a full export to Android project
2) Assuming you have Android SDK and Eclipse installed (if not https://developer.android.com/sdk/installing/index.html), import your app into Eclipse
3) Install AdsInterface plugin, as you wanted admob, it would involve:
a) Copying files for admob from downloaded plugin folder
i)/libs/armeabi/libads.so
ii)/libs/armeabi-v7a/libads.so
iii)/libs/x86/libads.so
iiii)/libs/x86/libads.so
iiiii) /src/com/giderosmobile/android/plugins/ads/Ads.java
iiiiii) /src/com/giderosmobile/android/plugins/ads/AdsInterface.java
iiiiiii) /src/com/giderosmobile/android/plugins/ads/AdsManager.java
iiiiiiii) /src/com/giderosmobile/android/plugins/ads/AdsState.java
iiiiiiiii) /src/com/giderosmobile/android/plugins/ads/AdsStateChangeListener.java
iiiiiiiiii) /src/com/giderosmobile/android/plugins/ads/frameworks/AdsAdmob.java
b) Opening your main activity (.java file in your src/com/giderosmobile/android directory of exported project) and adding
i) System.loadLibrary("ads"); under System.loadLibrary("gideros");
ii)"com.giderosmobile.android.plugins.ads.Ads" under "com.giderosmobile.android.plugins.googlebilling.GGoogleBilling",
c) Modifying AndroidManifest.xml
i) adding
ii) adding this chunk to application tag:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
d) Adding reference to Google Play service
i) downloading Google Play Service or taking the one provided with the plugin
ii) putting it in the same directory where exported project directory is
iii) importing it in eclipse
iiii) referencing Google Play Services from your exported project (http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject)
4) Making your project a Gideros play, by removing assets folder inside assets folder
5) Running your project on device
a) Enabling developer options on your device (is OS specific, but usually can be found somewhere in the settings)
b) connecting your device to PC
c) selecting run as Android in eclipse
d) choosing your device when asked
6) Integrating ads in your Gideros project in lua
a) requiring plugin:
So I went as thorough as I could
At which point do you have a problem?
Likes: DoradoLab
Thanks,
Dorado Lab
i am trying on this will do all one by one and let u know the status...
Thanks
Dorado Lab
require "Ads"
local inmobi = Ads.new("inmobi")
inmobi:setKey("014d25c7fa4243179eb620cd501d7c07")
inmobi:enableTesting()
inmobi:showAd("auto")
inmobi:setAlignment("center", "bottom")
But in the device nothing is changing because its showing compilation error as follow.
Uploading finished.
inmobi.lua:1: attempt to index global 'Ads' (a nil value)
stack traceback:
inmobi.lua:1: in main chunk
So simple error i think please tell me where i am wrong. So it will be soon cleared...
Thanks
Dorado Lab
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
I have tried that too but same error. May be something wrong in start up. That Gid project set up. Can anyone have a look at my attached project.
Thanks,
Dorado Lab
Likes: DoradoLab
[tkhnoman 12:23PM
I never tested inmobi, it is not supported in my country.
Probably the best thing to test is admob.
The code looks okay for me.
You don't need to export to run on player.. Just run it by setting the IP on Gideros Studio.
* Sometime setAlignment need to be called at AD_RECEIVED or AD_DISPLAYED event. ]
Thanks buddy that was the exact answer.. Which i liked. Hi five.... Thanks a lot. It worked.
Also thanks for ar2rsawseen...
Moving forward soon launching my first gideros game.
Thanks
Dorado Lab